Skip to content

Emitted events in angular route

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

$routeChangePermissionStart

Event broadcasted before start of authorizing.

$rootScope.$on('$routeChangePermissionStart',
function(event, nextRoute) { ... });

$routeChangePermissionAccepted

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

$rootScope.$on('$routeChangePermissionAccepted', function(event, nextRoute) { ... });

$routeChangePermissionDenied

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

$rootScope.$on('$routeChangePermissionDenied', function(event, nextRoute) { ... });

Next to read: 👉 Transition properties