-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
What problem does this feature solve?
Using the to parameter is overly verbose for example:
<router-link :to="{ name: 'user', params: { userId: 123 }}">User</router-link>
What does the proposed API look like?
Would be better to move some of the fields as props so you could have:
<router-link to="user" :params="{ userId: 123 }">User123</router-link>
This seems more natural to use. The first version I find I have to lookup the syntax each time, it's not obvious.
It's also a more natural progression for learning. For example you start with the basic:
<router-link to="/foo">Go to Foo</router-link>
And then to add a param you just add the param prop:
<router-link to="/foo" :params="{bar:123}">Go to Foo</router-link>
It's much easier for end users to learn and adopt. It's more obvious and straight forward. It's also backwards compatible (in that you just don't use the new props and the old way works also).
uxPete, Jblew, tunarob and joallard
Metadata
Metadata
Assignees
Labels
No labels