I am trying to achieve the following routes.js:
routes: [{
path: "/objects/:id?",
component: _45173a6a,
name: "objects-id",
children: [{
path: 'add-comment',
component: _14a12353,
name: 'object-id-add-comment'
}]
}, {
...
I am trying to use a modal as a nested route to perform a task for each object. For example, the '/objects/2'
route has a <nuxt-child/>
component in it for adding comments with the route path '/objects/2/add-comment'
.
My directory structure is as follows:
pages/
--| objects/
----| _id/
------| index.vue
------| add-comment.vue
----| index.vue
However, the resulting routes.js
is flat. I am trying to achieve the following routes.js
instead:
routes: [{
path: "/objects/:id?",
component: _45173a6a,
name: "objects-id",
children: [{
path: 'add-comment',
component: _14a12353,
name: 'object-id-add-comment'
}]
}, {
...