Open zoltanka opened 1 month ago
In case when one has nested pages like: /tool, and /tool/foo in the route definition we have the following:
/tool
/tool/foo
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.
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>
{ name: string }
<RouterLink to:"{ name: 'tool-foo-name' }">
I have created a PR to solve this. That is of course a very ridumentary solution. Only if there is interest in accepting this feature, then I'll put more time into it. Can I get maybe some attention on this?
In case when one has nested pages like:
/tool
, and/tool/foo
in the route definition we have the following:Note that in the children, the
path
are always relative to their parent component'spath
.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: