vendredi 2 septembre 2016

How can I observe the current route name from the application controller in Ember 2.7.1?

I've been doing this previously as follows:

pageDidChange: Ember.observer('currentPath', function() {
    this.set('pageClassName', this.get('currentPath').replace(/[.]/g, '-'));    
}),

However this no longer works as the currentPath property seems to have disappeared. I also can't find any mention of it in the API docs on the EmberJS website.

Should I now be doing this differently?




Aucun commentaire:

Enregistrer un commentaire