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> 

http://jsbin.com/lizerazire/edit?html,js,output


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -