I am new to knockout.js. I have a Y/N value from my model that I want to bind to a checkbox.
This is my view:
<tbody id="tblMultiEdit" data-bind="foreach: UUTs">
<tr>
<td data-bind="text: SerialNumber"></td>
<td><input type="checkbox" data-bind="ReqDowngrade" /></td>
<td><input type="checkbox" data-bind="ACTSupported"/></td>
<td><input type="checkbox" data-bind="ProdModeOff"/></td>
</tr>
</tbody>
Knockout code:
function ViewModel(UUTs)
{
var self = this;
self.UUTs = UUTs;
};
var viewModel = new ViewModel(@Html.HtmlConvertToJson(Model));
ko.applyBindings(viewModel);
So far I can bind the text with no problem, but checkboxes are in blank.
data-bind="ReqDowngrade"Find how to bind inputs values here: knockoutjs.com/documentation/checked-binding.html