$stateChangeStart is firing multiple times
See original GitHub issueI was having issues with page loading bars in my app acting a little crazy. After a bit of debugging, I’m finding that $stateChangeStart
is being broadcasted multiple times, which is seriously confusing our loading bars and a few other components that depend on that event.
As soon as I removed angular-permission from the single page app, everything worked as normal and $stateChangeStart
* just fired once on each state load.
Is this expected functionality, since angular-permission
must stop the state change to check permissions, or this is a bug?
I’m going to do some more debugging and I’ll post more later. Just wanted to get the issue logged before I get off work. Thanks in advance for your help!
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:7
Top Results From Across the Web
Why is $stateChangeStart triggering multiple times?
I am trying to use $stateChangeStart with ui router in a controller. It seems like everytime it's fired, the callback fires +1 times...
Read more >$stateChangeStart is firing multiple times · Issue #192
I was having issues with page loading bars in my app acting a little crazy. After a bit of debugging, I'm finding that...
Read more >Why is $stateChangeStart triggering multiple times
I am trying to use $stateChangeStart with ui router in a controller. It seems like everytime it's fired, the callback fires +1 times...
Read more >$stateChangeStart won't fire up, but $locationChangeStart ...
Hey,. I have a login function in my ctrl, after the user successfully logged in, he gets redirected to 'home' state. $state.go('home').
Read more >Enforcing login at app startup - ionic-v1
The problem actually wasn't the event $stateChangeStart not being fired at startup. The problem is that it's fired multiple times but only ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As it is known problem, the olny solution I would recommend is migration to ui-router 1.x (that is not that hard as it seems).
Hello @masterspambot I have the same problem here, I am working on a very large app which depends a lot on
$stateChangeStart
and$stateChangeSuccess
, we are using a loading overlay for state transitions, after addingangular-permission
this loading overlay is not shown, what is the solution and how should I solve it? I am usingui-router
version0.2.15
andangular-permission
version5.3.0