javascript - Angular Get Selected CheckBoxes -


i have list of dynamically filled checkboxes using angular.

 <div ng-repeat="x in xlist">      <label>{{x.header}}</label>      <input type="checkbox" name="x" value="{{x.item.id}}" />      <p>{{x.header}}</p>  </div> 

i want method retrieve list of selected checkboxes. i'd use

 $('input[name=checkboxlist]:checked').each(function() { } 

but not acceptable angular .... there appropriate method so?

here implemented plunker

 <input type="checkbox" ng-model="selected[record.id]"> {{record.id}}   $scope.showselected = function() {   console.log($scope.selected);   alert(json.stringify($scope.selected)); }; 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -