I have an middleware that attaches a resolve handler to transition using
transition.then(function(){
setFlag
})
Then in application code
router.transitionTo('parent').then(function(){
checkFlag
})
checkFlag will run before setFlag.
I hit this issue twice, one when i tried to set a property in router.state to be read after a transition and now when, inside middleware, i set active class for anchors according to href. These issues are showing in the tests and i could overcome them but i foresee actual use cases being affected also
It occurs because transitionTo/dispatch returns before running the middleware
Is there any way to the middleware be notified of the end of the transition before application code?
I have an middleware that attaches a resolve handler to transition using
Then in application code
checkFlagwill run beforesetFlag.I hit this issue twice, one when i tried to set a property in router.state to be read after a transition and now when, inside middleware, i set active class for anchors according to href. These issues are showing in the tests and i could overcome them but i foresee actual use cases being affected also
It occurs because transitionTo/dispatch returns before running the middleware
Is there any way to the middleware be notified of the end of the transition before application code?