$ 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
angularjs angular-routing


source to share


No one has answered this question yet

Check out similar questions:

828
AngularJS: Preventing $ digest error is already being executed when calling $ scope. $ Apply ()
4
Angular Router - $ watch state parameters not working
1
ui-router | resolve addiction | forced reboot | forced update
1
Why does state.go with notify = false lead to future navigation to keep the current page url parameters?
0
$ http callbackback in factory does not work when infinite loop exists in startup block
0
Angular ui router, multi-step validation form and REFRESH
0
Refresh Parameter Change View
0
The ui-router controller is initialized to ui-sref again
0
AngularJS: $ state.transitionTo ('myState') supports reloading angular ui-router
0
$ stateChangeStart does not start on logout



All Articles
Loading...
X
Show
Funny
Dev
Pics