[Vuejs]-Vuejs dynamic routes with variable parameters

2👍

Use the params object to specify:

<router-link :to="{ name: 'mixtapesDetails', params: { id: data.id } }">
     {{data.title}}
</router-link>

When id is 1234 that should send you to /mixtapeDetails/1234 according to your router configuration.

See https://router.vuejs.org/en/api/router-link.html

Leave a comment