Angular JS Checkbox Questions

Asked

Viewed 69 times

0

I have a little problem in my application, I have a Grid with check-box and a check-box to mark all. I want a job that weaning the check-box that marks all when you don’t have all the 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>

Concluding[...]

I want chkMarcaToday to be checked if all the selected Cad are checked and chkMarcaToday is unchecked if any selected Cad is unchecked.

  • 1

    shows its angular code, which it has tried to do so far, the ng-repeat values so we don’t have the job of simulating it again...

  • @Felipeduarte independent of the information, there is only one example, what I need can be applied to any example that there are flags (check-box) and a check box that marks all. NOTE: What I tried is irrelevant because it didn’t work.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.