Can someone help me with extracting the content of a $event.emit? I am facing an issue where the console.log inside the function displays the content, but once outside the function, it does not show the variable.
mounted () {
this.$events.on('emitEvent', function (eventData) {
this.line = _.cloneDeep(eventData)
console.log('1', this.line)
})
console.log('2', this.line)
}
I have been utilizing this particular package for event management.