title: filter multiple checkbox angular
body: <p>I am trying to filter my results on multiple checkboxes.</p>
  
  <p>Here is my <a href="http://jsfiddle.net/3jLRJ/261/" rel="nofollow noreferrer">JSFIDDLE</a></p>
  
  <p>How do i write dynamic <code>ng-model</code> for the <code>checkboxes</code> for the filter to take reflect?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function MainCtrl($scope) {
       $scope.languages = [
          { name: 'persian', _id : 0 },
          { name: 'English', _id : 1 },
          { name: 'spanish', _id : 2 } 
        ];
      $scope.bu = [
          { name: 'A', _id : 1 },
          { name: 'B', _id : 2 },
          { name: 'C', _id : 3 },
          { name: 'D', _id : 4 },
          { name: 'E', _id : 5 }
        ];
      
      $scope.array = [
    {   
      "id": 910,   
      "language": {
        "_id": "333",
        "name": "Persian",
        "abbreviation": "PE"
      },
      "business_unit": {
        "_id": "2",
        "name": "B"
      }
    },
    {    
      "id": 909,   
      "language": {
        "_id": "456",
        "name": "English",
        "abbreviation": "EN"
      },
      "business_unit": {
        "_id": "3",
        "name": "C"
      }
    },
    {    
      "id": 908,   
      "language": {
        "_id": "456",
        "name": "Spanish",
        "abbreviation": "SP"
      },
      "business_unit": {
        "_id": "4",
        "name": "D"
      }
    },
    {    
      "id": 911,   
      "language": {
        "_id": "343",
        "name": "German",
        "abbreviation": "GE"
      },
      "business_unit": {
        "_id": "5",
        "name": "E"
      }
    },
    {    
      "id": 912,   
      "language": {
        "_id": "696",
        "name": "Russian",
        "abbreviation": "RU"
      },
      "business_unit": {
        "_id": "1",
        "name": "A"
      }
    }]
   
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"&gt;&lt;/script&gt;
  &lt;div ng-app&gt;
      &lt;div ng-controller="MainCtrl"&gt;
      
      
      
      
     &lt;li ng-repeat="o in languages" ng-model="lang.language.name"&gt;
        &lt;input type="checkbox"&gt;
        {{o.name}},
    `&lt;/li&gt;
    
     &lt;br&gt;&lt;br&gt;&lt;br&gt;
     &lt;li ng-repeat="o in bu"&gt;
        &lt;input type="checkbox" ng-model="bu.business_unit.name"&gt;
        {{o.name}},
    `&lt;/li&gt;
    
    &lt;br&gt;&lt;br&gt;&lt;br&gt;
    &lt;div ng-repeat="arr in array filter : lang | filter : bu"&gt;
        {{arr.language.name}} "and" {{arr.business_unit.name}}
    &lt;/div&gt;
    
  &lt;div&gt;</code></pre>
  </div>
  </div>
  </p>