// Add dynamic segment to route path, enable props to give component access to :id parameter
{
path: '/event/:id', // dynamic segment
name: 'EventDetails',
props: true, // allows dynamic segment to be passed as props to component
component: EventDetails
},
// bind router link to route name and pass id as parameter:
<router-link :to="{ name: 'EventDetails', params: { id: event.id } }">
// use id as prop in EventDetails component:
export default {
props: ['id'],
// ...