vue router generate url using name code example
Example 1: vue router url string
const resolved = this.$router.resolve({
name: 'SomeRouteName',
params: { id: item.id }
})
resolved.href // '/some-route-name/:id'
Example 2: vue router name
router.push({ name: 'user', params: { userId: 123 }})