javascript - Not been able to check radio button in knockout using type script -
that's how radio button bound,
<input type="radio" name="none" value="-1" data-bind="enable: isenabled, checked: isnonechecked" />none it's typescript code , isnonechecked defined this,
isnonechecked: knockoutobservable<boolean>; in constructor setting 'true',
this.isnonechecked(true); i expect on page load radio button checked.
its seems not working.
super cool right,
here typescript,
class viewmodel { constructor() { this.isnonechecked('true'); } isnonechecked: knockoutobservable<string> = ko.observable('false'); } thanks
Comments
Post a Comment