title: Clear text input on click with AngularJS
body: <p>How can I clear a text input on click of a button using angularJS?</p>
  
  <p><img src="https://i.stack.imgur.com/1UOvs.png" alt="Search input"></p>
  
  <p>The X is a seperate link, on which I would like to trigger a function.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;input type="text" class="form-control" data-ng-model="searchAll"&gt;
  &lt;a class="clear" data-ng-click="clearSearch()"&gt;X&lt;/a&gt;
  </code></pre>