Take a look at my Plunker. When you click on the profile
link and examine the list of state changes:
stateChanges = [
" -> home",
"home -> profile",
"home -> signIn",
"signIn -> signIn"
]
You'll notice an unexpected extra state change "signIn -> signIn"
.
After some debugging, it seems that this is caused by ui-router's reaction to $locationChangeSuccess
through the afterLocationChange
function. I'm not sure if this is a bug in ui-router or a result of how I've configured ui-router and handle redirections. If it's something on my end, how can I resolve it?
Your assistance would be greatly appreciated, as the double state change leads to my query parameters being doubly URL encoded:
/profile -> %2Fprofile -> %252Fprofile
instead of just the first two.
UPDATE
It appears that this issue arose with version 0.2.15. I tested older releases and even 0.2.14 works without any problems. Upon further investigation, I discovered that the problem originated from commit 48aeaff
. By uncommenting the code that was commented out in that commit, the issue is resolved even in version 0.2.15. For now, I will utilize this modified version of 0.2.15.
I also noticed that there is an open issue for this in ui-router's issue tracker: #1573
.