Quasar Version: v0.17.2
Node Version: v9.4.0
NPM Version: 5.6.0
While working on my project, I am trying to manipulate the ajax bar using start/stop events. However, an error occurs when my App.vue file is being rendered.
Error Message in mounted hook: TypeError: Cannot read property $on of undefined
Here is a snippet of the template:
<q-ajax-bar ref="loadingBar" :delay="delay" :speed="speed" :color="color" />
And here is the script section where the error happens:
this.$refs.loadingBar.$on('stop', () => {
console.log("ajax-bar stop");
});
this.$refs.loadingBar.$on('start', () => {
console.log("ajax-bar start");
}
});
If anyone has any ideas on how to fix this issue, your help would be greatly appreciated!