vue-2-crumbs icon indicating copy to clipboard operation
vue-2-crumbs copied to clipboard

Dynamic passing the params

Open sara-farokhi opened this issue 2 years ago • 0 comments

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

sara-farokhi avatar Aug 13 '22 07:08 sara-farokhi