Search code examples
angularjschecklist-model

Checklist-model automatically checking all checkboxes


When I click on one checkbox, I am expecting only that checkbox to be marked. For some reason, however, when I click on one checkbox, they are all getting marked.

<label ng-repeat="group in groups" id="mast" class="list-group-item">
    <input type="checkbox" checklist-model="selectedGroups.group" checklist-value="value" checklist-change="change()">
    Group {{$index + 1}}
</label>

Solution

  • It's probably because of checklist-value="value". The value property is the same for each instance of the ng-repeat.

    Try to replace by checklist-value="group.value".