title: Filter array in aurelia view
body: <p>I am using <a href="http://aurelia.io/index.html">aurelia</a> and want to filter a collection (array) in view rather than in view model.</p>
  
  <p>I am trying the following syntax to do so:</p>
  
  <pre><code>&lt;div class="col-sm-7  col-md-7 col-lg-7 ${errors.filter(function(err){return err.Key==='car.Model';}).length &gt;0? 'alert alert-danger' :''}"&gt;
              &lt;span repeat.for="error of errors"&gt;
                  &lt;span if.bind="error.Key==='car.Model'"&gt;
                      ${error.Message}
                  &lt;/span&gt;
              &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And I am getting following error in browser console: </p>
  
  <p><code>Error: Parser Error: Missing expected ) at column 28 in [errors.filter(function(err){return err.Key==='car.Model';]</code>.</p>
  
  <p>This is possible in angularJS as follows:</p>
  
  <pre><code> &lt;div class="small-7  medium-7 large-7 columns end"&gt;
          &lt;span class="error" ng-repeat="error in errors  | filter:{ Key: 'car.Model'}"&gt;
              &lt;span class="error-message"&gt;
                  {{error.Message}}
              &lt;/span&gt;
          &lt;/span&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Is similar thing also possible in aurelia? </p>
  
  <p>I would also love to know how a collection/array can be filtered in <code>repeat.for</code> in aurelia (similar to <code>ng-repeat</code>). I tried to use filter function in similar fashion but it too didn't work and I got similar error.</p>