-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Support 2 extra parameters when navigating like with router.push #2332
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
This is expected as the redirect makes is cancelling the navigation |
Thanks for the feedback! My use-case is showing a loading bar when routing starts and hiding it when routing is done. I'm using Any idea how this can be accomplished? |
@posva I understand this behavior is expected but then vue-router might be missing a feature to support my use-case described above. |
Maybe we could support 2 extra parameters like with |
A global This edge case of redirecting to the current route is a tough one, because it is not really an explicit abort. As a developer I might expect the same thing (callback and all) to happen as any other route transition. Anyway, a global |
This comment has been minimized.
This comment has been minimized.
I appreciate your interest but it's not really necessary to add more to this thread 🙂 |
Closing in favour of #2012 For the moment, the loading bar can be cancelled by using the |
Version
3.0.1
Reproduction link
https://codepen.io/xMartin/pen/EpLPKr
Steps to reproduce
What is expected?
See "after /bar" as the last entry in the console.
What is actually happening?
See "redirect to /bar" as the last entry in the console.
All works fine if the current route is not the one that is going to be redirected to in
beforeResolve
. It also works fine if the redirect happens inbeforeEach
.The text was updated successfully, but these errors were encountered: