When I click on a list item that sends itself as parameters to the routerlink, it works fine. However, when I click on another list item again, it doesn't change the page. Can someone provide guidance on this issue?
This snippet is from Router.js:
{
path: '/works/:sort_id',
name: 'WorksView',
component: WorksView,
}
And this code is from nav.vue:
<ul v-for="(nav, index) in navSorts" :key="index">
<router-link :to="{name: 'WorksView', params: {sort_id: nav.title}}"><p>{{ nav.title }}</p></router-link>
<li v-for="(sort, index) in nav.sort" :key="index">
<router-link :to="{name: 'WorksView', params: {sort_id: sort}}"><p>{{ sort }}</p></router-link>
</li>
</ul>