The <nuxt-child> Component

This component is used for displaying the children components in a nested route.


-| pages/
---| parent/
------| child.vue
---| parent.vue

This file tree will generate these routes:

    path: '/parent',
    component: '~/pages/parent.vue',
    name: 'parent',
    children: [
        path: 'child',
        component: '~/pages/parent/child.vue',
        name: 'parent-child'

To display the child.vue component, we have to insert <nuxt-child/> inside pages/parent.vue:

    <h1>I am the parent view</h1>

To see an example, take a look at the nested-routes example.

Caught a mistake or want to contribute to the documentation? Edit this page on GitHub!