I am currently dealing with multiple nested ng-repeats in my project, and the third level down consists of a group of checkboxes. Initially, I receive an array of options for these checkboxes, which I handle with the following code snippet:
<div class="fadingOptionsHere" ng-repeat="fading in fade.options">
<input type="checkbox" ng-model="fadingsHere" value="{{fading.id}}">{{fading.name}}
</div>
My goal is to only retrieve the values of the selected checkboxes. Ideally, I would like to replace the nested options array with an array containing only the selected items, allowing me to send back the JSON object in that format.
Since this is at the third level of nesting, I am facing difficulties in tracking these selections. How can I extract only the selected values (i.e., fading.id) from the checkboxes for each iteration of the ng-repeat loop?
So far, my attempts to reference the fadingsHere model have been unsuccessful.
Any assistance on this matter would be greatly appreciated!