nuxt emit

Solutions on MaxInterview for nuxt emit by the best coders in the world

showing results for - "nuxt emit"
Lukas
06 Oct 2020
1$nuxt.$emit('my-custom-event') // to emit an event
2
3created() { listen to an event anywhere in the nuxt app
4   this.$nuxt.$on('my-custom-event', () => {
5     //Do Something
6   })
7}
Davide
10 Oct 2016
1$nuxt.$emit('my-custom-event')
2
3created() {
4   this.$nuxt.$on('my-custom-event', () => {
5     //Do Something
6   })
7}