D
D
Dilik Pulatov2017-09-08 13:47:58
Vue.js
Dilik Pulatov, 2017-09-08 13:47:58

Vue.js2 how to correctly write child parameters in router?

Hello!
in the router I wrote the following rules

{path: '/post', component: Post, children:[
    {path: 'create', component: PostCreate},
  ]},

but when going to /post/create it still ends up in /post. for some reason not to see the PostCreate template
what did I do wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kulakov, 2017-09-08
@dilikpulatov

In the Post component template, you must have a nested <router-view> in which children are passed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question