This can help to find out that there is an enter event that you could handle inside the route:
other: Ember.Route.extend({ route: '/other', connectOutlets: function(router, context) { }), enter: function(router) {
Not sure if there is a solution that better suits your needs.
Update: If you use the action helper, the click event will trigger the action as you wish. An example is in the template: <a {{action gotoOtherState href="true"}}>Go to other state</a> and on the route that you were in (or in the ancestor ... the gotoOtherState: Ember.Route.transitionTo('path.to.otherState') route in this case): gotoOtherState: Ember.Route.transitionTo('path.to.otherState') .
href=true is an optional touch for the <a> tags. You can also define your own transitions:
gotoOtherState: function(router, event) {
Note: if you pass a context in your action helper (for example, {{action gotoOtherState this}} ), you can access it through an event: router.transitionTo('path.to.otherState', event.context);
Update 2: enter is a private hook, while activate is the new public host (see http://emberjs.com/blog/2013/02/15/ember-1-0-rc/ )
source share