【发布时间】:2016-06-25 04:13:26
【问题描述】:
<table class="table">
<thead>
<th> <input type='checkbox' name='selectall' ng-model="value1" ng-click="selectAll()"></th>
<th> Name </th>
</thead>
<tr ng-repeat="x in items">
<td><input type='checkbox' ng-model="value2" ng-true-value="YES" ng-false-value="NO" ng-click="select($event,x.id)"
/></td>
<td>{{x.name}}</td>
</tr>
</tr>
</table>
当我单击“selectall()”复选框时如何获取所有 item.id?
另外,你能建议我为 ng-repeat 复选框推荐合适的 ng-model 语法吗?
谢谢, 拉贾K
【问题讨论】: