0👍
Building off of JeRmiZa answer, I’d like to add an alternative option that is more readable in the template and requires no programmic routing.
Use vue-router’s router-link component:
https://router.vuejs.org/guide/#router-link
<router-link v-for="s in student.student_records" :to="`/student/${s.uuid}/fee/${student_record.id}`">
<button class="dropdown-item custom-dropdown">
{{student_record.batch.course.name}} {{trans('finance.fee_allocation')}}
</button>
</router-link>
- [Vuejs]-How can i use context with setup script vue composition api
- [Vuejs]-How to access protected routes if the user is admin or not in vuejs
Source:stackexchange.com