nested dynamic routes are not working on page, but do on refresh #651
Unanswered
amir20
asked this question in
Questions and Help
Replies: 2 comments 3 replies
-
Seems like it's better to use However, it does seem to be a bug with nested routes for navigating the first time. It doesn't work. I can try to recreate it if that helps? @posva ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
You are missing the component that creates a layout (component + folder). There is an example in the docs |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goal
I want to create a nested route like the following:
/container/<id>
goes toContainerView
/container/<id>/time/<date>
goes toContainerTimeView
.What I did
I have created the following directory
Based on the discussion I found, I created the following:
[id].vue
index.vue
and[date].vue
map to proper components as expected.Problem
This doesn't seem to work as expected. It creates
And when navigating to
/container/<id>
it doesn't work. But IF I REFRESH THE PAGE, it does work. 😐If I fixed
[id].vue
to:Then this works.
Is this to be expected? Is there a way to have the two routes exist? It seems like without
<router-view>
the nested route won't work. Which I think is counter intuitive.Beta Was this translation helpful? Give feedback.
All reactions