-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Currently the Router supports the Route didTransition event:
App.Router = Ember.Router.extend({
myAfterTransitionHook: function() {
//stuff
}.on('didTransition')
});
However, the Router does not support the Route willTransition event. In other words, you can't do this:
App.Router = Ember.Router.extend({
myBeforeTransitionHook: function() {
//stuff
}.on('willTransition')
});
Is there a specific reason for not supporting willTransition? If not, I'd be happy to submit a PR. I'd like to be able to save/record state right before a transition happens, on a general level, not specific to an individual route. Something along the lines of intercepting any time {{link-to}} happens.