title: search using filter only after click in angular
body: <p>I want to search from large list of data (500+ item) using filter but because of two way data binding of angular the search result appears as I start to type in search key word. But what i want is the data to appear only after I click search button.</p>
  
  <p>Till now I have managed to get the desired result only for the first time I click search button i.e when  enter search key word in search input and click search button for the first time the search result appears only after click but after that it starts to appear as I type in search input. </p>
  
  <p>How can I do to make searched result appear only after I click search button?</p>
  
  <p>Here's what I have till now</p>
  
  <pre><code>       angular.module('sumitClientApp')
             .controller('AboutCtrl', function ($scope) {
  
  
    $scope.users=  [
         {name: 'john', 'address': 'tx' },
         {name: 'jim  ', 'address': ' ms' },
         {name: 'roy  ', 'address': ' ktm' },
         {name: 'hari  ', 'address': ' ktm' },// there is more data
       ]
  
      $scope.search=function(){
          $scope.usersToFilter=$scope.users;
          $scope.searchReasult=true;
  
      }
    });
  </code></pre>
  
  <p>Html:</p>
  
  <pre><code> &lt;div class="search-box"&gt;
     &lt;input type="text" ng-model="query"&gt;
      &lt;div class="search-box-btn"&gt;
          &lt;span&gt; 
            &lt;button type="button"  ng-click="search()"&gt;search
           &lt;/button&gt;&lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;ul class="users" ng-show="searchReasult &amp;&amp; query"&gt;
      &lt;li ng-repeat="user in usersToFilter | filter: query |orderBy:type"
          class="thumbnail user-listing"&gt;
          {{user.name}}
          &lt;p&gt;{{user.address}}&lt;/p&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>