1👍
Instead of location.reload()
, you should be using window.location.href='path-to-form'
0👍
The router-link
will redirect to the path :to="{name: 'signUp', params:{id:item.title}}"
on click. You don’t need to add the button click event inside.
If you’re trying to navigate to the route singUp
on clicking button, you can use
<router-link :to="{name: 'signUp', params:{id:item.title}}" tag="button">
Go {{ item.title }}
</router-link>
OR
<b-button variant="primary" onClick="$router.push({name: 'signUp', params:{id:item.title}})" >Go {{ item.title }}</b-button>
Which will redirect you to the route with name signUp
.
Source:stackexchange.com