If you are still struggling with the ken option, you can try something like this:
{{
And then you need the goToLink function to handle the action. You can put it in your collection, but if you do not, it is assumed that it will bubble before your route handler, which theoretically should make things very easy:
App.MyRoute = Ember.Route.extend({ // ... stuff ... actions: { goToLink: function(item) { this.transitionTo(item.route); } } });
Learn more about actions here: http://emberjs.com/guides/templates/actions/
Update
I have compiled a violin for you using the latest and greatest Ember.
I made a slight change in my suggestion above, due to some technical limitations that I discovered.
In particular, only the Route seems to be able to handle actions for the controllers that were created inside the route. This is a problem for our navigation menu, as you change routes while they are still on the screen.
If I switched to using the "rendering" of the Handlebars descriptor to render the menu, no router seems to want to handle the action. However, the current router seems to always connect in a chain of bubbles to βsendβ to the controller. So, I have a controller that sends an event on a chain to a router, and we get our bliss of routing.
You can find the fiddle here: http://jsfiddle.net/Malkyne/fh3qK/
Update 2
Here is another version of the same script, only with the (obscurely undocumented) ApplicationRoute used to directly control this action, without having to relay the controller: http://jsfiddle.net/Malkyne/ydTWZ/
Tess
source share