$ stateChangeSuccess is not called
I have an update function that calls $ state.go (). In some cases, the $ stateChangeSuccess handler is called and others are not, but I don't understand why. I need a state change handler.
update function
$scope.refresh = function( group ) {
...
$state.go($state.current.name, $stateParams, {
reload: true,
location: true,
inherit: true,
relative: $state.$current,
notify: true
});
$ stateChangeSuccess handler
$scope.$on('$stateChangeSuccess', function( event, toState, toParams, fromState, fromParams ) {
console.log('$stateChangeSuccess handler called');
});
I'm wondering if there might be something that is interfering with the $ stateChangeSuccess handler? I thought there might be a $ stateChangeStart handler canceling the operation, but it doesn't.
+3
source to share
No one has answered this question yet
Check out similar questions: