If I list out checkboxes manually
<ul>
<li>
<input type="checkbox" ng-model="checkState"/>
</li>
<li>
<input type="checkbox" ng-model="checkState"/>
</li>
</ul>
Checking one checkbox checks all of the checkbox.
But if I use ng-repeat
<div>
<ul>
<li ng-repeat="elem in someArray">
<input type="checkbox" ng-model="checkState" />
</li>
</ul>
</div>
Checking one checkbox only checks one of them
Is there a reason for this? From the DOM they both looks the same.
Aucun commentaire:
Enregistrer un commentaire