-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Document Named Views and Nested Routes #1921
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
Hey, really sorry for the delay! If you're using named views with nested views, you'll have to name the nested views as well because otherwise, you end up with 2 In your fiddle you have to add a name to one of them: const Bar = { template: '<div>bar <router-view name="b"></router-view> </div>' } And use that in the route definition: { path: '/',
// a single route can define multiple named components
// which will be rendered into <router-view>s with corresponding names.
components: {
default: Foo,
a: Bar,
b: Baz
},
children:[
{ path: '', components: { default: Foo2, b: Bar2 }},
]
} Here's a working version: https://jsfiddle.net/4xwnz3mg/ |
This could be documented, so reopening this to track it |
But with this methods how can i continue the chain with Bar 3 for example? |
What Bar3? You mean adding another nested route to the children routes? |
I mean adding in bar 2 another nested route bar 3 |
You add a |
* docs: add example of nested named routes Closes #1921 * docs: add link of jsfiddle in note * review * [skip ci] review
Version
3.0.1
Reproduction link
Full problem Example
https://jsfiddle.net/oaxs8ek8/
Steps to reproduce
I have created a Homepage with 2 Named Views called for example RouteA and RouteB.
Now RouteA and RouteB have 2 other nested routes like so RouteA1 and RouteA2 - RouteB1 and RouteB2.
this work very well for the first route but then i cant continue the routing chain for the 2 differente route since i cant only do this:
There is no way to specify the different route.
A solution could be enable this for example:
What is expected?
The router should allow nested route with named view router
What is actually happening?
it's not routeing correctly
The text was updated successfully, but these errors were encountered: