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

angular - DownloadURL return null in below code -

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -