-
I added two routes through the following two methods, I want to test and use them in Layout.vue, but after clicking the link, it jumps to the new page instead of the router-view location. Is it because I used it wrong? router.addRoute({
path: '/demon1',
component: demon1
})
router.addRoute({
path: '/demon2',
component: demon2
}) <!--Layout.vue-->
<router-link to="/demon1">demon1</router-link><br>
<router-link to="/demon2">demon2</router-link><br>
<router-view></router-view> |
Beta Was this translation helpful? Give feedback.
Answered by
xcyeye
Aug 29, 2021
Replies: 1 comment
-
I know what is wrong, I did not nest the routing,Sorry to disturb everyone |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Mister-Hope
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I know what is wrong, I did not nest the routing,Sorry to disturb everyone