Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Router-link by name ":to-name" #2998

Closed
de-don opened this issue Oct 17, 2019 · 1 comment
Closed

Router-link by name ":to-name" #2998

de-don opened this issue Oct 17, 2019 · 1 comment

Comments

@de-don
Copy link

de-don commented Oct 17, 2019

What problem does this feature solve?

It would be convenient to have a shortcode for routing by name of the route. This will save the user from constantly passing an object with only one "name" field

What does the proposed API look like?

I propose to create a shortcut:

<router-link to-name="home"> Home page </router-link>

that will be equal to

<router-link :to="{name: 'home'}"> Home page </router-link>
@posva
Copy link
Member

posva commented Oct 17, 2019

Duplicate of #2818

@posva posva marked this as a duplicate of #2818 Oct 17, 2019
@posva posva closed this as completed Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants