Can anyone help to figure out ng-checked
$scope.ABC=[{ID:23,NAME:zz},{ID:65,NAME:tt},{},{}]
<table>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th></th>
<th><input type="checkbox" ng-model="AllChecked" /></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="x in ABC">
<td>{{x.ID}}</td>
<td>{{x.NAME}}</td>
<td><input type="checkbox" ng-model="x.selection" ng-checked="AllChecked" required /></td>
</tr>
</tbody>
Output i want:-
[{ID:x.23,Select:true},{ID:x.65,Select:true},{ID:x.ID,Select:true}]
This work if i use for loop. But i do not want to use loop. Is there any other way any one can hep.I tried with ng-change, ng-click but still didn't work.