Answers for "nuxt js emit event"

0

nuxt js emit event

$nuxt.$emit('my-custom-event') // to emit an event

created() { listen to an event anywhere in the nuxt app
   this.$nuxt.$on('my-custom-event', () => {
     //Do Something
   })
}
Posted by: Guest on December-29-2020
0

nuxt emit

$nuxt.$emit('my-custom-event')

created() {
   this.$nuxt.$on('my-custom-event', () => {
     //Do Something
   })
}
Posted by: Guest on January-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language