130
rated 0 times
[
133]
[
3]
/ answers: 1 / hits: 165473
/ 7 Years ago, thu, september 14, 2017, 12:00:00
I have a component and want to add a click listener that runs a method in the parent template in Vue. Is this possible?
<template>
<custom-element @click=someMethod></custom-element>
</template>
<script>
export default {
name: 'template',
methods: {
someMethod: function() {
console.log(true);
}
}
</script>
More From » vue.js