0👍
Try this:
<li v-for='child in item.children'>
<a href="#" v-on:click.prevent="navigate(chidl.text)">
{{child.text}}
</a>
</li>
and then, in your methods:
navigate (to) {
this.$router.push(to)
}
See more details here
- [Vuejs]-How to access component data outside export
- [Vuejs]-VUE Js V-IF toggle not working as expected
Source:stackexchange.com