-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix($state.transitionTo): trigger $stateChangeCancel appropriately (#…
…3039) Current behaviour: We are in state A. We start a transition to state B. `$stateChangeStart` is triggered. Before `$stateChangeSuccess` is triggered for state B, we start a transition back to state A. No state events are triggered and we are left hanging without any notification. Updated behaviour: When the state change to B is superseded by the state change back to A, `$stateChangeCancel` is broadcasted on `$rootScope` for the transition from B -> A. This behaviour makes sure that for every `$stateChangeStart` there is a corresponding `$stateChange<Success|Error|Cancel>` thus completing the lifecycle. Fixes issue #3027
- Loading branch information
1 parent
a8aa40a
commit ca7c366
Showing
3 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters