-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Version
3.5.1
Reproduction link
https://codesandbox.io/s/vue-router-forked-1td7i?file=/src/main.js
Steps to reproduce
Click on Go to Todo
, click on About
What is expected?
To have a property in a matched route that is able to be passed to a router-link without needing a name
What is actually happening?
It is currently impossible to create a link to a matched route if it's not named and with params, because the path
in a matched route is not interpolated and contains the params definition
In the case where you have a default child route (eg: path = '') using a name would also not work because it would not go to the desired child route (and there is a warning in the console about that)
Having a fullPath
property like on the $route
or something similar to each matched route would be a good addition so we can go up in the route tree in a generic way
It was also brought up in #1435 but as I demonstrated a named route is not a generic solution