-1
It is very simple, but not very recommended.
To issue a console.log directly in the template you can use:
this.console.log('test')
For example:
<button @click="this.console.log('Hello')"> My Button </button>
I hope I helped in some way
- [Vuejs]-Call v-model from a different component in VueJS
- [Vuejs]-Vue.js custom directive doesn't run componentUpdated hook?
Source:stackexchange.com