title: Angularjs search entire HTML
body: <p>I am trying to create a search function that will highlight specific text on an Android app (Ionic/Cordova using angularjs).</p>
  
  <p>From all the sample code I referred, I can find something that looks like this:</p>
  
  <pre><code>&lt;div ng-init="friends = [{name:'John', phone:'555-1276'},
                       {name:'Mary', phone:'800-BIG-MARY'},
                       {name:'Mike', phone:'555-4321'},
                       {name:'Adam', phone:'555-5678'},
                       {name:'Julie', phone:'555-8765'},
                       {name:'Juliette', phone:'555-5678'}]"&gt;&lt;/div&gt;
  
      Search: &lt;input ng-model="searchText"&gt;
  &lt;table id="searchTextResults"&gt;
    &lt;tr&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Phone&lt;/th&gt;&lt;/tr&gt;
    &lt;tr ng-repeat="friend in friends | filter:searchText"&gt;
      &lt;td&gt;{{friend.name}}&lt;/td&gt;
      &lt;td&gt;{{friend.phone}}&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;hr&gt;
  
  Any: &lt;input ng-model="search.$"&gt; &lt;br&gt;
  Name only &lt;input ng-model="search.name"&gt;&lt;br&gt;
  Phone only &lt;input ng-model="search.phone"&gt;&lt;br&gt;
  Equality &lt;input type="checkbox" ng-model="strict"&gt;&lt;br&gt;
  &lt;table id="searchObjResults"&gt;
    &lt;tr&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Phone&lt;/th&gt;&lt;/tr&gt;
    &lt;tr ng-repeat="friendObj in friends | filter:search:strict"&gt;
      &lt;td&gt;{{friendObj.name}}&lt;/td&gt;
      &lt;td&gt;{{friendObj.phone}}&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Is there a way to search through an entire HTML document, and not just searching through an array like above?</p>