Using AngularJS, 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.
I know I can add an ng-click event on the button itself and call a function, but I am not sure that is the correct way to do it.
Right now all I have is:
<input type="text" ng-model="searchQuery" />
<button class="btn" <!--do something here maybe?-->>
<i class="icon-search" ng-class="{'icon-refresh': searchQuery.length}"></i>
</button>