dimanche 11 janvier 2015

Is it possible to disable all checkboxes after three ng-repeated checkboxes have been checked?

For example



<input type="checkbox" ng-repeat="color in colors"
ng-class="checked <= 3 ? '' : 'disabled'"/>


When I select an up to three checkboxes I want to disable the rest. What would be the angular way of doing this? Would I be able to keep everything "inline" or do I have to resort to filters/models?





Aucun commentaire:

Enregistrer un commentaire