lundi 30 mars 2015

Ember - Route event for attempting transition to active route

I'm trying to make sure my side menu closes anytime someone attempts to transition to any route, even the same route the user is already on.


This doesn't fire on the attempt to the same route, just on all others:



var ApplicationRoute = Ember.Route.extend({
actions: {
willTransition: function(){
// Close menu always
//this.controllerFor('application').set('menuOpen', false);
console.log('willTransition fired!');
}
}
});


Any ideas?





Aucun commentaire:

Enregistrer un commentaire