angular.js - $stateChangeSuccess event not executed when state jumps?
習慣沉默2017-05-15 17:04:56
0
7
605
I want to use the parameters in the $stateChangeSuccess event to perform operations, but $stateChangeSuccess is always not executed. Are there any regulations for the use of $stateChangeSucces? Please give me some advice if you are a beginner!
I also encountered this problem. I have been looking for the problem for a long time. There is no problem with the code. Just change angular-ui-router to the stable version. I started using the beta version and the current stable version is 0.4.2
No problem is found in the code, you can check whether your run file has been imported
console.log(toState.name) try it
I feel like the parameters are written wrong
There is no problem with the code in the picture, the event will be triggered, but the problem lies elsewhere.
I also encountered this situation. Later I checked and found out that it was because I forgot to add dependencies in the module
And I finally found that the way to write 1.xx of ui.router 0.xx seems to be different
I also encountered this problem. I have been looking for the problem for a long time. There is no problem with the code. Just change angular-ui-router to the stable version. I started using the beta version and the current stable version is 0.4.2