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

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -

angular - DownloadURL return null in below code -