我编写此代码以添加联系人到组。 我如何逐行复选框? 这是行内复选框列表。
<ion-list>
<ion-item ng-repeat="employee in employees" >
<label class="checkbox">
<input ng-model="checkGroups[employee.id]" type="checkbox">
</label>
{{employee.name}}
</ion-item>
</ion-list>
答案 0 :(得分:0)
<ion-list>
<ion-item ng-repeat="employee in employees track by $index ">
<label class="checkbox">
<input name={{$index}} ng-model="checkGroups[employee.id]" type="checkbox">
</label>
{{employee.name}}
</ion-item>
</ion-list>