You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Download repo and install dependencies with pnpm install
Run the repo with pnpm dev
Click on link About (navigation by path to "/about")
See that a the child route named about.child with the component AboutChildView.vue is shown
Click on link About (navigation by name)
See that the child route named about.child with the component AboutChildView.vue is NOT shown
Expected behavior
I would expect navigation by name to behave exactly as navigation by path. The default child route with path path: "" should be shown regardless if I use to="/about" or :to="{name: 'about'}".
Actual behavior
The default child route with path path: "" is not shown, when defining a RouterLink like this:
Reproduction
https://github.com/AntonioDell/vue-router-name-bug
Steps to reproduce the bug
pnpm install
pnpm dev
About (navigation by path to "/about")
about.child
with the componentAboutChildView.vue
is shownAbout (navigation by name)
about.child
with the componentAboutChildView.vue
is NOT shownExpected behavior
I would expect navigation by name to behave exactly as navigation by path. The default child route with path
path: ""
should be shown regardless if I useto="/about"
or:to="{name: 'about'}"
.Actual behavior
The default child route with path
path: ""
is not shown, when defining a RouterLink like this:<RouterLink :to="{ name: 'about' }">About</RouterLink>
with a router definition like this:
Additional information
EDIT: I also noticed, that the links actually look the same in the DOM. So this makes it more apparent, that this is a bug.
The text was updated successfully, but these errors were encountered: