Error in call back for watcher, method is not a function
-
I’m trying to use the watchers as referenced here , however the method call I invoked inside the watcher is not recognized as a function.
I basically followed the guide. Any thoughts? Thank you.
-
This is not quasar specific, and it would help if you could post your code so we can tell you what is wrong. This should work fine:
<q-input v-model="message"/>
data () { return { message: '' } }, methods: { messageChanged () { console.log(this.message) } }, watch: { message () { this.messageChanged() } }
-
My case has been answer at SO. Thank you very much. https://stackoverflow.com/questions/47670499/quasar-framework-method-inside-watcher-is-not-recognized
-
You issue seems to have been the binding of
this
due to improper use of arrow functions.