title: AngularJS, clear input text with button
body: <p>Using <code>AngularJS</code>, what is the proper way to clear the value of a text field? I have an input field with a button next to it. The user types in it and hits the button to clear or reset it.</p>
  
  <p>I know I can add an <code>ng-click</code> event on the button itself and call a function, but I am not sure that is the correct way to do it.</p>
  
  <p>Right now all I have is:</p>
  
  <pre><code>&lt;input type="text" ng-model="searchQuery" /&gt;
  &lt;button class="btn" &lt;!--do something here maybe?--&gt;&gt;
    &lt;i class="icon-search" ng-class="{'icon-refresh': searchQuery.length}"&gt;&lt;/i&gt;
  &lt;/button&gt;
  </code></pre>