-
Notifications
You must be signed in to change notification settings - Fork 3k
Change URL (without state change) in onExit #3194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
So I've, done some searching and found #2977 were someone suggests using $state.target for simply redirecting to another state. But this won't work for me since I need to first update the current state and then continue with the original transition. |
Ok, so this can be "fixed" by returning false in the onExit and starting a new $state.go inside a $timeout allowing the original transition to finish. Not sure if there is a better way to do this though. |
Can you create a state that has the temporary url? If so, you can redirect to that in |
My use case is as follows. I need to alter the url just before the current state has exited.
I have tried using the regular $state.go without luck (it will just give me an exception saying "The transition has been superseded by a different transition")
Is it possible to perform a state change in a transition hook?
PS. I'm using ui-router 1.0
The text was updated successfully, but these errors were encountered: