Skip to content

Event when transition to same state is cancelled #1016

@nikaspran

Description

@nikaspran

There is currently a lack of an event to mark the end of the state change when transitioning to the same state. To be exact, the $stateChangeStart event is emitted, but no event signifying the end of the transition (neither $stateChangeSuccess nor $stateChangeError). This makes it impossible to cover all possible transition results via event handling.

To be precise, this code cancels the transition:

      if (shouldTriggerReload(to, from, locals, options) ) {
        if (to.self.reloadOnSearch !== false) $urlRouter.update();
        $state.transition = null;
        return $q.when($state.current);
      }

I'd like to suggest that an event would be sent, something along the lines of $stateChangeCancelled or something of the sort.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions