title: Angularjs ng-click displaying data filtered by multiple parameters
body: <p>I'm following this great post: <a href="https://stackoverflow.com/questions/14379934/how-to-filter-a-list-in-angularjs-using-several-links">How to filter a list in AngularJS using several links</a></p>
  
  <p>Now I'd like to display data filtered by multiple parameters on click. </p>
  
  <p><strong>html</strong></p>
  
  <pre><code>&lt;div ng-app&gt;
    &lt;span ng-click="myFilter = {type: 1}"&gt;Type 1&lt;/span&gt; | 
    &lt;span ng-click="myFilter = {type: 2}"&gt;Type 2&lt;/span&gt; |
    &lt;span ng-click="myFilter = {type: 3}"&gt;Type 3&lt;/span&gt; |
    &lt;!-- multiple filter - not working --&gt;
    &lt;span ng-click="myFilter = [{type: 1}, {type:3}]"&gt;Types 1 &amp; 3&lt;/span&gt; |
    &lt;span ng-click="myFilter = null"&gt;No filter&lt;/span&gt;
    &lt;ul ng-controller="Test"&gt;
      &lt;li ng-repeat="person in persons | filter:myFilter"&gt;{{person.name}}&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>js</strong></p>
  
  <pre><code>function Test($scope) {
    $scope.persons = [{type: 1, name: 'Caio'}, {type:2, name: 'Ary'}, {type:1, name: 'Camila'}, , {type:3, name: 'Daniel'}];
  }
  </code></pre>
  
  <p>The multiple parameters filter example doesn't work that way. Is there a simple and generic way to achieve that, without coding a custom filter ?</p>
  
  <p>I updated the jsfiddle: <a href="http://jsfiddle.net/pkxPa/89/" rel="nofollow noreferrer">http://jsfiddle.net/pkxPa/89/</a></p>
  
  <p>Any idea ? 
  Maybe there is a better way like using ng-show (like in this post: <a href="https://stackoverflow.com/questions/16660826/show-hidden-div-on-ng-click-within-ng-repeat">Show hidden div on ng-click within ng-repeat</a>) ?</p>
  
  <p>Thanks</p>