Reputation: 943
I can get the current path using:
App.__container__.lookup('controller:application').get('currentPath')
But then how can I get the Route instance for that path?
Upvotes: 0
Views: 537
Reputation: 1800
Or maybe:
App.__container__.lookup("controller:application").get("currentRouteName")
Upvotes: 1
Reputation: 688
Simple:
var pathName = App.__container__.lookup('controller:application').get('currentPath');
var route = App.__container__.lookup('route:' + pathName);
Upvotes: 1