You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be nice if there is a helper function that parse an object to an URL based on matched route from routers list.
Currently, we have to use <router-link> and bind that object to :to, but what if I want to bind a <a :href="">?
<a:href="`/video/${video.id}`?t=${video.t}`">
This is ok. However, sometimes, the route path changes (for example: /videos instead of /video), in that case we have to find all the <a> and replace with the new path, I don't think it's a good idea.
But if we use the route name instead of the path, it will work despite of changing route path.
What problem does this feature solve?
I think it would be nice if there is a helper function that parse an object to an URL based on matched route from routers list.
Currently, we have to use
<router-link>
and bind that object to:to
, but what if I want to bind a<a :href="">
?This is ok. However, sometimes, the route path changes (for example:
/videos
instead of/video
), in that case we have to find all the<a>
and replace with the new path, I don't think it's a good idea.But if we use the route name instead of the path, it will work despite of changing route path.
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: