Reputation: 11
I am trying to call custom JS functions within onclick event with Vuejs 2 and I get the below error. I omitted the curly braces for the prop used as per the migration guide.
Any ideas ?
Thanks.
Upvotes: 1
Views: 1728
Reputation: 4235
I usually rethink about putting native code in or Out of VueJs, sometimes using onclick is easier than on:click, if need call such these native functions in VueJs can call them by:
window.funcName()
Upvotes: 1
Reputation: 1092
I think you should try to move your native function call to VueJS event handler (in methods). In other words, just wrap.
Upvotes: 1