-
-
Notifications
You must be signed in to change notification settings - Fork 5k
[2.0] redirect() not changing hash / abort() equivalent #692
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
Hi, thanks for filling this issue.
Please read more about navigation guards here:
|
While navigation is cancelled (i.e. the correct component is displayed in the router outlet), the hash change is not canceled. Previously If hash is changed outside of using
|
I see.. It may indeed be a bug. @yyx990803 |
Uh oh!
There was an error while loading. Please reload this page.
Example: http://run.plnkr.co/O8drrKqdru329Cf4/#/a
Source: http://plnkr.co/edit/fjHGwqUnUTzq2eDpKVTa?p=preview
Standalone source in case plunker is down: http://pastebin.com/bN2vMGY4
Steps in the above example:
Result:
#/b
In the previous version of vue-router, using
abort()
would revert the hash back to the correct path.On a site note, how do we handle the removal of
abort()
?redirect()
needs you to know the previous path, where asabort()
automatically reverted back to the previous path.The text was updated successfully, but these errors were encountered: