So, I'm developing a Cordova Android app with VueJS and I use background geolocation plugin
It emits global event called 'location' which my app listens in main.js
function onDeviceReady () {
BackgroundGeolocation.on('location', (location) => {})
}
document.addEventListener('deviceready', onDeviceReady, false)
How can I pass location data to variable in component every time event is fired?