Reputation: 133
i have my deafult layout and i whant to make a page with a layout and inside the layout a component that will be change insdie and chacnge the url to
how i do that with nuxt?
i have my base layout in red and i have a page layout in blue now i have a links ander the Dashbord and i want whnan i click on the links the black box inside change only by other component and the url chacnge to but i didnt the nuxt call again to the blue layout
Upvotes: 10
Views: 8756
Reputation: 13519
If you have a default.vue and a nested.vue and an index.vue and you would like to next index in nested and nested in turn in default, just add a default tag into nested.
<default>
<p>My content in here</p>
</default>
Upvotes: 0
Reputation: 361
I had a similar issue and solved by nesting pages using <nuxt-child/>
.
GitHub: Nuxt.js Nested Routes Example Repository (not official)
Create a parent page like pages/group-foo.vue
:
<template>
<div>
<!-- ... -->
<nuxt-child />
</div>
</template>
Then, create a directory with the same name as the parent page: pages/group-foo/
.
Also, see these official documents:
Upvotes: 11