I want to pass a data-bind value as function parameter.
Here is sample code:
<data-bind="click: function (data) { myFunction('param1', data) }">
this is my view model
var vm = {
Category: ko.observableArray(),
Product: ko.observableArray(),
CatID: ko.observable("113"),
save: saveChanges,
Filter: FilterProduct,
};
CatID is an observable so there are some functions who change the CatID when they are called. and i want to pass this CatID as a parameter when specific button clicked.
Please help how can i do this.