angular-ui-router
  • Introduction
  • Configuring State
  • Activating State
  • Named Views
  • Nested State
  • onEnter onExit
  • Passing Data
  • Resolve Property
  • State Params
  • State Service
  • State Events
  • Abstract State
Powered by GitBook
On this page

Was this helpful?

State Events

angular.module("myApp")
    .run(function($rootScope){
        $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams){

        });
        $rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams){

        });
        $rootScope.$on('$stateChangeError', function(event, toState, toParams, fromState, fromParams, error){

        });
        $rootScope.$on('$stateNotFound', function(event, unfoundState, fromState, fromParams){

        });
    });
PreviousState ServiceNextAbstract State

Last updated 5 years ago

Was this helpful?