angularjs - How to check with checkbox ng-if? -


if use ng-if in check box , have test.check = "y" value, want check check box when search. case?

<input type="checkbox" ng -if=" test.check == 'y' chekced"  value="{{test.roomnum}}" check-list="checkedmodel.roomnum">{{assign.roomnum}} 

you dont need use ngif in case, can use [checked]. change html following:

<input type="checkbox" [checked]="test.check === 'y'"                        value="{{test.roomnum}}"                         check-list="checkedmodel.roomnum">{{assign.roomnum}} 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -