3.0.1
Run this link: http://jsfiddle.net/w6q9uyro/
Try route to /home
It should load component Home and run HomeFirstChild component because children route alias is empty ('' default route).
It only load Home component and nothing more.
This problem is shown in version 2.8.x 3.0.x.
In version 2.7.0 work in first time route but if we want route more than one the router doesn't want work properly
version 3.0.1: http://jsfiddle.net/w6q9uyro/
version 2.7.0: http://jsfiddle.net/mx3a6vLj/
Add redirect in parent route:
http://jsfiddle.net/zy0db0wx/
I think this is actually expected behaviour. You see, when you navigate to a route by name, vue-router will not render this route's default child (a child with path: ''). To do that, you have to navigate to that default child route by name. (As you also do with {name: 'home.first-child'} in the example.
Normally, you see a warning about this in the development/non-minified builds defined here:
`Named Route '${route.name}' has a default child route. ` + `When navigating to this named route (:to="{name: '${route.name}'"), ` + `the default child route will not be rendered. Remove the name from ` + `this route and use the name of the default child route for named ` + `links instead.`
The problem is that you don't get this warning, presumably because you defined the default path through through alias, not the path.
We should check how to improve this situation that the warning also appears for aliases.
Most helpful comment
I think this is actually expected behaviour. You see, when you navigate to a route by name, vue-router will not render this route's default child (a child with
path: ''). To do that, you have to navigate to that default child route by name. (As you also do with{name: 'home.first-child'}in the example.Normally, you see a warning about this in the development/non-minified builds defined here:
The problem is that you don't get this warning, presumably because you defined the default path through through
alias, not thepath.We should check how to improve this situation that the warning also appears for aliases.