0👍
Try this:
const route = [
{
path: '/home',
component: Homepage
},
{
// other routes ...
},
{
path: "*",
component: PageNotFoundComponent
}
]
If you want wrap one component into another, use <slot></slot>
element, read here: https://v2.vuejs.org/v2/guide/components.html#Content-Distribution-with-Slots
Example:
ParentComponent:
<template>
<div>
<!-- Something fun -->
<slot></slot>
</div>
</template>
<script>
export default {
}
</script>
Child Component:
<template>
<parent-component>
<!-- Something else -->
</parent-component>
</template>
<script>
import ParentComponent from 'path-to-parent-component'
export default {
components: {ParentComponent}
}
</script>
Source:stackexchange.com