I am following the accepted answer of this question: Hide links from Google via JavaScript
I want to pass the href to my method linkAction()
, how can I achieve this with an @click
?
This is what I have so far
<template>
<span
href="https://www.w3schools.com/" <-- some url
@click="linkAction(this)"
>
Link to W3 Schools
</span>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
@Component
export default class MainContent extends Vue {
linkAction(e: any): any {
console.log(e);
}
}
</script>
I am getting on my console: null
. Would appreciate some help. Thanks!