javascript - Call function inside function by v-on:click -
how can able call function inside function ?
template : (html)
<a v-on:click="hello.world"></a>
js : (as component)
methods: { hello: function() { return { world: function() { alert('hello world'); } }; } }
this got warning :
[vue warn]: invalid handler event "click": got undefined
this possible call this.hello().world()
js but not in template (html) v-on
what missing ?
it should used in bit different way make working
<a v-on:click="hello().world()">foo</a>
Comments
Post a Comment