I'm trying to pass a dynamic ID to the router_link but I can't seem to figure out how to do it.
This is what I'm currently trying:
<router-link to="/leagues/{{props.item.id}}">League</router_link>
That props.item.id equals 10 but this syntax isn't correct. I'm also referencing the documentation but I can't seem to find a straightforward answer for this. Any help would be great.
Ok so passing a dynamic ID to vue-router should look like this:
<router-link :to="{name: 'League', params: {id: props.item.id}}">League</router_link>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With