frog frog - 4 months ago 52
AngularJS Question

angular Clear icon inside input text

Is it possible to do something like this -> Clear icon inside input text

only in angular.js? I need it for my angular application and due to various private scopes I can't get it working with jQuery.


Assuming you are using ng-model:

<div class="container">
    <input type="text" ng-model="someTextField" />
    <button ng-click="someTextField = ''">x</button>