Vue Router default child route not loading initially
Here's what I've found to work:
...
{
props: true,
path: '/sections/:id',
name: 'route.sections',
component: Sections,
redirect: {
name: 'route.details'
},
children: [
{
alias: '',
path: 'details',
name: 'route.details',
component: Details
},
{
path: 'secondary',
name: 'route.secondary',
component: Secondary
}
]
}
...
Adding in redirect: { name: 'route.details' }
now makes the parent route redirect to the chosen child route.