AngularJS - UI Router stateChangeSuccess event not firing
StateChange events has been deprecated for ui.router >= 1.0
for the new ui.router
use the following
StateChangeSuccess
$transitions.onSuccess({}, function() { console.log("statechange success");});
StateChangeStart
$transitions.onStart({}, function(trans) { console.log("statechange start");});
Check this migration guide for more information
If you are using the new ui-router (v1.0.0), the $stateChange*
events will not work. You must use $transitions.on*
hooks from now on.
You can read here.
https://ui-router.github.io/docs/latest/modules/ng1_state_events.html
$state events are deprecated for angular version > 1.0.0. now onward for change event we have to use $transitions
refer $transitions from here