title: how to include a "string includes" function inside a angular filter
body: <p>I am working on filtering with checkboxes, My geojson has a property of status. the status is value looks like this:</p>
  
  <blockquote>
    <p>status
    :
    "Act 3Q99"</p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p>status
    :
    "Fut 3Q99"</p>
  </blockquote>
  
  <p>I need to filter by "Act" or "Fut". here is my filter:</p>
  
  <pre><code>   function StatusFilter() {
  
      return function (territorySubdivisions, typeFilter) {
          var filtered = [];
          angular.forEach(territorySubdivisions, function (subdivision) {
              if (typeFilter.active == true &amp;&amp; typeFilter.future == true) {
                  filtered.push(subdivision);
              }
              else if (typeFilter.active == true &amp;&amp; typeFilter.future == false &amp;&amp; subdivision.properties.status == subdivision.properties.status.indexOf('Act') != -1) {
                  filtered.push(subdivision);
              }
              else if (typeFilter.future == true &amp;&amp; typeFilter.active == false &amp;&amp; subdivision.properties.status == subdivision.properties.status.indexOf('Fut') != -1) {
                  filtered.push(subdivision);
              }
          });
          return filtered;
      };
  };
  </code></pre>
  
  <p>here is what I tried. </p>
  
  <blockquote>
    <p>subdivision.properties.status.indexOf('Act') != -1</p>
  </blockquote>
  
  <p>It of course is not working. I created a working plunker. I included other orderBy and filtering code to make sure there were no conflicts. </p>
  
  <p><a href="http://plnkr.co/edit/OnUryDqiRYrhoDjIj5z8?p=preview" rel="nofollow">working plunker</a></p>
  
  <pre><code>   &lt;div class="col-xs-3"&gt;
              &lt;div class="checkbox checkbox-success checkbox-inline"&gt;
                  &lt;input type="checkbox" id="active-checkbox-filter" ng-model="vm.typeFilter.active" ng-change="vm.statusActive('active')"&gt;
                  &lt;label for="active-checkbox-filter"&gt; Active &lt;/label&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-xs-3"&gt;
              &lt;div class="checkbox checkbox-success checkbox-inline"&gt;
                  &lt;input type="checkbox" id="future-checkbox-filter" ng-model="vm.typeFilter.future" ng-change="vm.statusFuture('future')"&gt;
                  &lt;label for="future-checkbox-filter"&gt; Future &lt;/label&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>