-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
addRoute() with name couldn't replace the existing rule with the same name. #3517
Comments
This is a misalignment with v4. We should be able to fix the simple cases without aliases by removing routes from Note dynamic routing is not supported in vue router 3 |
In this case, I feel the description should be removed from the document, or a warning should be made. The current description is misleading。 In https://router.vuejs.org/api/#router-addroutes,
|
Hello. Agree with @klwfwdk . The docs are stating this should be possible in 3.5.0 but it is not. |
Please update the documentation, this is frustrating. |
Sorry to bother here ; is there a known workaround ? |
This has been an issue for over a year and a half, yet it is still detailed in the documentation as a working method for > I believe the open PR #3519 fixes this issue. If this is not planned to be fixed can we remove it from the docs ASAP? I'm sure there are many like me who are losing days to trying to get this working before unearthing this issue via a search! |
Is there a known workaround for this issue? |
I believe the only workaround would be to fork |
Reporting we have the same issue and was confused as the docs said this should overwrite an existing route. A couple hours wasted. |
+1 here as well for docs change, though porting over |
Version
3.5.1
Reproduction link
https://github.com/klwfwdk/addroute-issue
Steps to reproduce
1.click to call router.addRoute() to add a new router named 'About' witch has the same name attribute with a route rule already existing.
2.click router-link 'About'
What is expected?
the route overwrite into new one. The browser should show 'This is an about page New'
What is actually happening?
Still appears as an unupdated component. The browser showed 'This is an about page'
The text was updated successfully, but these errors were encountered: