I have a small catch in my application, I have a Grid with check-box and a check-box to mark all . I want a function that unchecks the check-box that marks all when you do not have all grid check boxes checked.
<table>
<thead>
<tr>
<th><input type="checkBox" ng-model="chkMarcaTodos"/></th>
<th>Nome</th>
<th>Telefone</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="cad in cadastros track by $index">
<td><input type="checkBox" ng-model="cad.selecionado"/></td>
<td>{{cad.nome}}</td>
<td>{{cad.telefone}}</td>
</tr>
</tbody>
</table>
Completing [...]
I want the chkMarcaTodos to be marked if all the selected chars are checked and the chkMarcaTodos is cleared if any selected chars are deselected.