59
rated 0 times
[
62]
[
3]
/ answers: 1 / hits: 26616
/ 11 Years ago, tue, april 9, 2013, 12:00:00
Is there any foolproof way to access controller from a route?
<a href=# class=btn {{action someAction user}}>add</a>
App.ApplicationRoute = Ember.Route.extend
events:
someAction: (user) ->
console.log 'give me name from currentUser controller'
The someAction is very general and I think that ApplicationRoute is the best place for it.
More From » ember.js