Ramanaa Gj Ramanaa Gj - 1 year ago 105
AngularJS Question

filtering in angular by select and checkbox

want to filter out values both the select box and in checkbox i achieved in select box but can't able to get from checkbox


Answer Source

Example Here. Use a single object for the checkboxes, and then you can use a comparator function in the filter, like this:

$scope.checkMake = function(value) {

  //Assume no filter is applied so the value will be shown.
  var result = true;

  for (var i in $scope.selected) {
      if ($scope.selected[i] === true) {
          //if we get here, we know a filter is applied, so 
          //check to see if the passed value is one of the selected 
          result = $scope.selected[value];
  return result;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download