I am wondering if it is possible with knockoutjs to pass arguments when binding.
I am binding a list of checkboxes and would like to bind to a single computed observable in my viewmodel. In my viewmodel (based on parameter passed to the read function) I want to return true/false based on certain conditions.
var myViewModel=function(){
this.myprop=ko.computed({read: function(){
//would like to receive an argument here to do my logic and return based on argument.
}
});
};
<input type=checkbox data-bind=checked: myprop(someval1) />
<input type=checkbox data-bind=checked: myprop(someval2) />
<input type=checkbox data-bind=checked: myprop(someval3) />
Any suggestions?