vuejs listen for emit event code example
Example 1: how to emit a function in vue
this.$emit('myEvent')
Example 2: event vueks
new Vue({
el: '#example-3',
methods: {
say: function (message) {
alert(message)
}
}
})
this.$emit('myEvent')
new Vue({
el: '#example-3',
methods: {
say: function (message) {
alert(message)
}
}
})