In emberjs pre2 we could access router from any where like
App.get('router')
Can anybody suggest what could be the similar code for emberjs rc1?
Thanks
Can anybody suggest what could be the similar code for emberjs rc1?
Emberjs rc1 does not expose the router in this way.
As an alternative you should access router via local references.
It's not just the router, pretty much everything that used to be accessible via global constants is now hidden. This is because using global constants to access instances breaks encapsulation, and while that is fine for the console it should be avoided in your application code.
this.get('target').transitionTo('other.route')
and from within a route you simply dothis.transitionTo('other.route')
– MilkyWayJoe