Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs $stateChangeSuccess未调用_Angularjs_Angular Routing - Fatal编程技术网

Angularjs $stateChangeSuccess未调用

Angularjs $stateChangeSuccess未调用,angularjs,angular-routing,Angularjs,Angular Routing,我有一个调用$state.go()的刷新函数。在某些情况下,$stateChangeSucture处理程序正在被调用,而在其他情况下则没有,但我不明白为什么。我需要启动状态更改处理程序 刷新功能 $scope.refresh = function( group ) { ... $state.go($state.current.name, $stateParams, { reload: true, location: true, inherit: true,

我有一个调用$state.go()的刷新函数。在某些情况下,$stateChangeSucture处理程序正在被调用,而在其他情况下则没有,但我不明白为什么。我需要启动状态更改处理程序

刷新功能

$scope.refresh = function( group ) {
  ...
  $state.go($state.current.name, $stateParams, {
    reload: true,
    location: true,
    inherit: true,
    relative: $state.$current,
    notify: true
  });
$stateChangeSucture处理程序

$scope.$on('$stateChangeSuccess', function( event, toState, toParams, fromState, fromParams ) {
  console.log('$stateChangeSuccess handler called');
});

我想知道是否有什么东西阻止调用$stateChangeSucture处理程序?我原以为可能有$stateChangeStart处理程序正在取消该操作,但事实并非如此。

如果您有任何想法,我们将不胜感激。您找到解决方案或解释了吗?我也有同样的问题。谢谢你的帮助。