I need to know name of current Route in Ember from controller.after searching i find this topic and this topic but this.routeName
and this.get('currentPath')
dosent work for me.my Ember version is 1.1.2
Asked
Active
Viewed 1,503 times
1 Answers
4
The only way i know how to do this is to require application
controller like this.
App.AfterController = Ember.Controller.extend({
needs: ['application'],
init: function() {
alert('Current route is ' + this.get('controllers.application.currentPath'));
this._super();
}
});

iConnor
- 19,997
- 14
- 62
- 97