Skip to content

Emitted events in ui router

Błażej Krysiak edited this page May 10, 2016 · 4 revisions

Before start

Make sure you are familiar with:

Overview

  1. Event $stateChangePermissionStart
  2. Event $stateChangePermissionAccepted
  3. Event $stateChangePermissionDenied

$stateChangePermissionStart

Event broadcasted before start of authorizing.

$rootScope.$on('$stateChangePermissionStart', function(event, toState, toParams, options) { ... });

$stateChangePermissionAccepted

Event broadcasted when one of the permissions has been accepted and the state changes successfully.

$rootScope.$on('$stateChangePermissionAccepted', function(event, toState, toParams, options) { ... });

$stateChangePermissionDenied

Event broadcasted when the access to the target state is not granted.

$rootScope.$on('$stateChangePermissionDenied', function(event, toState, toParams, options) { ... });

Next to read: 👉 Transition properties