Is is it normal behavior for Vue to add a trailing slash to the default child subroute?
For example:
URL
Result:
/#/user/test/
Link
<router-link :to="{ name: 'user', params: { username: 'test' } }">Test User Overview</router-link>
Routes
routes: [
{
path: '/user/:username',
component: User,
children: [
{
path: '',
name: 'user',
component: UserOverview
},
{
path: 'stats',
name: 'user.stats',
component: UserStats
}
]
}
]
I would expect the user link to have the path specified by its parent, meaning without a trailing slash. Like this: /#/user/test
. If its normal behavior, can I somehow prevent it?