title: Angular filter and order elements on click
body: <p>I'm trying to filter a list of items (grabbed from JSON) onclick. I pull the data once from the server then would like to filter/order the elements using Angular.</p>
  
  <p>Here is my plunker: <a href="http://plnkr.co/edit/glSz1qytmdZ9BQfGbmVo?p=preview" rel="noreferrer">http://plnkr.co/edit/glSz1qytmdZ9BQfGbmVo?p=preview</a></p>
  
  <ol>
  <li><strong>Tabs</strong> -- How could I filter/sort the items onclick? "Recent" would be sorted by date and "Popular" would be sorted by views.</li>
  <li><strong>Categories</strong> -- I'm using ng-click to grab the category value although not sure how to update the filter dynamically (using the value passed onclick).</li>
  </ol>
  
  <p>Thanks</p>