I have ng-repeat
ed data, and am trying to get only the ones the user has selected. I\'m not sure how to do it though, this is what I have:
HTML:
I believe the best way would be to add property 'isSelected' to your record and bind to that value. Something like this:
another thing you can do (specially if you 'cannot' add that extra property to the record, would be to maintain an array of selected items and add/remove them from the selected array when the user makes the selection:
The recordSelected function will be handled in your controller to add/remove and record from the selected records list.
PS: I used a negative record id to represent the record was unselected.