Ramanaa Gj Ramanaa Gj - 3 months ago 31
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



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;