Angularjs $stateChangeSuccess未调用
我有一个调用$state.go()的刷新函数。在某些情况下,$stateChangeSucture处理程序正在被调用,而在其他情况下则没有,但我不明白为什么。我需要启动状态更改处理程序 刷新功能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,
$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处理程序正在取消该操作,但事实并非如此。如果您有任何想法,我们将不胜感激。您找到解决方案或解释了吗?我也有同样的问题。谢谢你的帮助。