mardi 21 mars 2017

AngularJS: uncheck checkboxes with no ng-model attribute

I want to uncheck all checkboxes when press some button. I need to do this on AngularJS (no jQuery). My checkboxes don't have ng-model attribute. How I can uncheck them? My HTML structure:

    <li ng-repeat="channel in channelsList">
         <div class="checkbox">
             <label><input type="checkbox" value="" ng-click="isChecked(channel.id)">
                <img src="images/checkbox-unchecked.png" alt="" class="unchecked">
                <img src="images/checkbox.png" alt="" class="checked"><span></span>
             </label>
         </div>
    </li>

My channelsList is only an array of objects with 2 properties: id and name.

Thanks for helping!




Aucun commentaire:

Enregistrer un commentaire