I know that jquery can operate the dom to check and then obtain it. But I just learned angularjs and I don’t know much about it. As follows:
This is in thead
<td><input type="checkbox" ng-model="selectAll">
This is on tbody:
<td><input ng-checked="selectAll" value="{{ x.id }}" name="beDel" type="checkbox"/></td>
This is the icon:
My question is: How to determine whether these checkboxes are selected and put the selected values into a collection?
Teach me if you are proficient in angularjs.
I just have experience, so let me think about it differently:
1: The select all button is a checkbox, and the other sub-buttons are lists of multiple checkboxes;
2: The checkbox of the sub-button is also bound to the checked value of the object when repeating (the default is / Does not exist/i.e. flase/i.e. not selected)
3: Add two extension methods to the array
4: Bind the extension event (1) to the select all button, and use the extension event (2) to get the id of the selected element
Demo:
Get the selected value:
http://stackoverflow.com/questions/12648466/how-can-i-get-angular-js-checkboxes-with-select-unselect-all-functionality-and-i
http://stackoverflow.com/questions/14514461/how-to-bind-to-list-of-checkbox-values-with-angularjs