title: How to filter on multiple fields in AngularJS ng-repeat
body: <p>I am creating a site with a search using the query filter in AngularJS. I have found many tutorials on how to implement this search in one field, but none that explain how to search across multiple fields. So if your data has firstName: "John", lastName: "Smith" I would like to be able to enter "John Smith" in my search bar, and find the correct results, but only the exact text of "John" or "Smith" works. </p>
  
  <pre><code>&lt;div ng-include="'partials/navbar.html'"&gt;&lt;/div&gt;
  &lt;div class="container" ng-controller="ResListCtrl"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-2"&gt;
              Search: &lt;input ng-model="query"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;hr&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-10"&gt;
              &lt;ul ng-repeat="reservation in reservations | filter:query"&gt;
                  &lt;li&gt;&lt;a href="#"&gt;{{reservation.firstName}} {{reservation.lastName}}&lt;/a&gt;&lt;/li&gt;
                  &lt;p&gt;{{reservation.resort}}&lt;/p&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>