Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Venkatakrishnai's avatar

how to pass the props using <route-link>

hi to all, please help me, anyone, how to pass the props using <route-link> in vue js , when clicking the route link the open the new component thanking you

0 likes
3 replies
beetuco's avatar
beetuco
Best Answer
Level 9

put it this way.. start at this documentation they are really well written. Don't skip through it, invest the time top to bottom.

Vue Router

Programmatic Navigation

Also, if your app is big enough that you need to transfer state around the place, consider vuex right away. It will save a lot of headaches down the track.

1 like
Venkatakrishnai's avatar

I need to pass the props as an object

<router-link :to="{ name: 'topic-view', props: { topic : topic.topic }, params: { id: topic.topic.id}}"> {{ topic.topic.name }} </router-link>

1 like

Please or to participate in this conversation.