vue-2-crumbs
vue-2-crumbs copied to clipboard
Dynamic passing the params
Hello Everyone I am trying to use vue-2-crumbs and I have some routes as follows in my router.js file this route is considered as the parent { path: "/metaService/:id/child", name: "IndexMetaServiceChild", meta: { title: "IndexMetaServiceChild", requiresAuth: true, permission: "platform.meta_service.get_child", breadcrumb: { label: "IndexMetaServiceChild", parent: "MetaServices", }, }, component: () => import("@/views/metaService/IndexMetaServiceChild"), },
and this route is considered as its following child
{ path: "/metaServices/metaServicesChild/edit/:parent/:id", name: "EditMetaServiceChild", meta: { title: "EditMetaServiceChild", requiresAuth: true, permission: "platform.meta_service.show", breadcrumb: { label: "EditMetaServiceChild", parent: { name: "IndexMetaServiceChild", params: { id: ":parent",
}
},
},
},
the bug is that I want to pass the ":parent" params to its parent dynamically however the ":id" param is passed by default. Is there any solution? Thank you