function irAlLink(link) {
if (linkAbierto.value.includes(link)) {
this.$emit('linkClickeado', link)
router.replace('/main')
} else {
this.$emit('linkClickeado', link)
router.replace(link)
}
}
I'm trying to giving the link to my other component:
<EssentialLink v-for="link in links2" :key="link.text" v-bind="link" @linkClickeado="agregarLink()" :linkAbierto="linkAbierto"/>
Within vue3 it isn't possible to access this.
within the setup script.
Please check this post: