Here's my plunker. If you click on the
profile link and look at the generated state change list:
stateChanges = [ " -> home", "home -> profile", "home -> signIn", "signIn -> signIn" ]
you can see there's an unexpected extra state change
"signIn -> signIn".
I've done some debugging and it seems it's ui-router's reaction to
$locationChangeSuccess via the
afterLocationChange function. But I'm not sure if that's a bug in ui-router or a result of how I configured ui-router and how I manage redirection. If the behavior is my fault, how do I fix it?
I would really appreciate the help, as the double state change causes my query parameters to be double URL encoded:
/profile -> %2Fprofile -> %252Fprofile instead of just the first two.
It seems this is something that came with 0.2.15. I tried using older releases and even 0.2.14 works fine. After some investigation I found the problem came with commit
48aeaff. If I uncomment the code that was commented out by that commit, this issue goes away even on 0.2.15. For now I will use this modified version of the 0.2.15.
I also found that there's an issue in ui-router's issue tracker for this