javascript - How are parameters passed to knockout functions? -
for binding :
<a data-bind='click: $root.thisvalue '> the corresponding knockout function takes 'link' parameter :
this.thisvalue = function(link) { how 'link' parameter set ? does'nt seem set within data binding ?
its not element, data context associated element
viewmodel = function() { this.data = "data"; } viewmodel.prototype = { handle: function(item) { console.log(item.data); } };
Comments
Post a Comment