Here is my HTML code snippet:
<tbody ng-repeat="notification in notifications">
<tr>
<td rowspan="{{notification.specs.length+1}}">{{notification.notification_id}}</td>
</tr>
<tr ng-repeat="position in notification.specs">
<td>{{position.lot}}</td>
<td>{{position.id}}</td>
<td>{{position.kind}}</td>
<td>{{position.name}}</td>
<td>{{position.release_form}}</td>
<td>{{position.mnn}}</td>
<td>{{position.tn}}</td>
<td>{{position.metric}}</td>
<td>{{position.price}}</td>
<td>{{position.count}}</td>
<td>{{position.full_character}}</td>
<td>{{position.package_count}}</td>
<td>{{position.who_checked}}</td>
<td><input type="checkbox" ng-init="position.is_checked = false" ng-model="position.is_checked"></td>
<td style="text-align:center" ><i class="icon-folder-open"></i></td>
</tr>
</tbody>
I am trying to figure out a way to determine if any of the checkboxes in the table are checked. If at least one checkbox is selected, I want to display a special block. However, if none of the checkboxes are selected, I need to hide the block.
UPDATE
When retrieving data from the server, the model does not include the field is_checked
. Is there any Angular method that allows me to manually add a field to the model?