Skip to content

Commit ca7dba4

Browse files
committed
fix($state.transitionTo): trigger $stateChangeCancel appropriately
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 angular-ui#3027
1 parent 953235a commit ca7dba4

File tree

3 files changed

+90
-70
lines changed

3 files changed

+90
-70
lines changed

0 commit comments

Comments
 (0)