I'm new in knockout and I couldn't solve a little problem, which is to set a checkbox as a default selected.
HTML:
<tr>
<td>
<input id="summary" type="checkbox" checked="checked" data-bind="checked: Summarise"/>
Summary
</td>
</tr>
Doc.Ready:
if (!viewModel) {
viewModel = new ViewModel();
}
ko.applyBindings(viewModel, document.getElementById("ParametersView"));
This returns unchecked checkbox when it gets called.
Aucun commentaire:
Enregistrer un commentaire