title: How can I obtain the result array of an angular "| filter" expression in a variable?
body: <p>In angular, you can write filter expressions like</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input type="text" ng-model="query"&gt;
  
  &lt;table&gt;
      &lt;tr ng-repeat="phone in phones | filter: query"&gt;
         &lt;td&gt;{{phone.vendor}}&lt;/td&gt;
         &lt;td&gt;{{phone.model}}&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>and it will update the table to show only the phones which match the <code>query</code> text you enter into the <code>input</code>.</p>
  
  <p>How can I get the corresponding result array of the filter, e.g. the <code>[phone object]</code>s that are currently displayed, in a variable (e.g. a scope variable)?</p>