Question: Is it possible to do something like this -> [Clear icon inside input text](https://stackoverflow.com/questions/6258521/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.

Answer: 
Assuming you are using ng-model:

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

```
I have ported the original jquery implementation to Angular JS. 

![enter image description here](https://i.stack.imgur.com/ffFqI.png)

[GitHub](https://github.com/aseemgautam/angular-input-clear-icon)