-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Using .addRoutes when you've got a wildcard route for 404s does not work #1176
Comments
This happens even when the wildcard route is a child route of '/', which is kinda strange. I do think that "root" routes should have higher priority than child routes. |
Hey, thanks for opening the issue. ping @fnlctrl @yyx990803 |
Maybe there could be an option to prepend the new routes instead of appending them? |
Hmm maybe dynamically added routes should have higher priority than the statically defined ones? @Dadibom Yeah an option seems nice |
Another option would be to optionally make |
We can also keep track of any asterisk route ( |
I'd be fine with any of the solutions mentioned, but I think the most transparent one would be appendRoutes / prependRoutes / replaceRoutes |
Is there an update for this? I just ran into it. I think that keeping track of |
well... i've got two main views (routes) that each have their own layouts. the * route is a child route to my main view. when i add the second view (admin), i still cannot access it. prepend/replace would be great. |
@LinusBorg Your answer solved my doubts. But I didn't find any information about |
Because it is a suggestion, not an existing feature. |
Vue.js / vue-router versions
2.1.10 / 2.2.1
Reproduction Link
https://jsfiddle.net/ytezcvzq/4/
Steps to reproduce
Add a new route when you've already got a wildcard route to display page not found messages
What is Expected?
The new route should be matched before the wildcard route
What is actually happening?
the wildcard route is matched first, meaning addRoutes does not work
The text was updated successfully, but these errors were encountered: