This issue tracker is for Bug Reports and Feature Requests only.
Please direct requests for help to StackOverflow. See http://bit.ly/UIR-SOF for details.
This is a:
[x] Bug Report
[ ] Feature Request
[ ] General Query
My version of UI-Router is: 1.0.6
Bug Report
Current Behavior:
When resolving a promise in an onBefore or onStart hook, if this results in returning a different target state, the transition continues as if there was no change to the target.
Expected Behavior:
onBefore should wait for the promise to resolve and change state if a new target is returned.
This issue tracker is for Bug Reports and Feature Requests only. Please direct requests for help to StackOverflow. See http://bit.ly/UIR-SOF for details.
This is a:
My version of UI-Router is: 1.0.6
Bug Report
Current Behavior:
When resolving a promise in an onBefore or onStart hook, if this results in returning a different target state, the transition continues as if there was no change to the target.
Expected Behavior:
onBefore should wait for the promise to resolve and change state if a new target is returned.
Link to Plunker that reproduces the issue:
https://jsfiddle.net/yw19qud6/1/
In this example, if AuthService rejects, you should be redirected to state2 (if that isn't the transition already).