I need to map a list of a selected checkbox to an javascript (AngularJS) array. When the user select one checkbox I need to update the related array. This array must have this structure:
$scope.items = ["value specific selected checkbox1", "value specific selected checkbox2"]
I use ng-true-value directive in my input tag to set a specific value of a selected checkbox to add to items array.
If the user unselect one checkbox I need to remove the specific value from items array. The array should not have duplicate values.