flowbite-vue icon indicating copy to clipboard operation
flowbite-vue copied to clipboard

FwbSideBarItem cannot be used with named route

Open zoltanka opened this issue 1 year ago • 0 comments

In case when one has nested pages like: /tool, and /tool/foo in the route definition we have the following:

const routes: RouteRecordRaw[] = [
    {
        component: ...,
        name: 'rool-route',
        path: '/tool',
        children: [
            name: 'tool-foo-name'
            path: 'foo',
            component: ...,
        ]
    }
]

Note that in the children, the path are always relative to their parent component's path.

If one would like to use named routes, the prop of the <RouterLink> expected the following type: { name: string }. So it must be used like:

<RouterLink to:"{ name: 'tool-foo-name' }">

zoltanka avatar Jul 03 '24 14:07 zoltanka