I want to append my the data that i clicked, but I get the same output as undefined.
<template>
<aside>
<ul>
<li v-for="link in links" > </li>
<button @click="tabLinks" v-text="link.textName" > </button>
</li>
</ul>
</aside>
</template>
this is my script file
export default {
data(){
return {
links : [
{textName: 'Link 1',icon: 'fa-user fa'},
{textName: 'link 2',icon: 'fa-search fa'},
{textName: 'link 3',icon: 'fa-thrash fa'}
],
}
},
methods: {
tabLinks(){
this.links.push({textName: this.textName })
}
}
}