i am trying to check all checkboxes
in angular's way.
I have the following codes:
<div>
<div class="checkbox">
<input ng-click="checkAll =! checkAll" type="checkbox"/> check all
</div>
<div class="checkbox" ng-repeat="item in items">
<input type="checkbox" ng-model="checkAll"/> {{item.title}}
</div>
</div>
I was able to check all checkboxes
when I click the check all
, however, if I check and uncheck the individual checkbox
, the check all
doesn't seem to applied that individual checkbox
anymore. Can anyone help me about this issue? Thanks a lot!