An AngularJS directive for adding a clear button inside an input element.
Just include angular-clearable.js
after angularjs (jQuery is not required).
Then you will need to make sure you require xngClearable
in your app module. That's it!
Using the xng-clearable
directive is pretty simple:
<input type="text" ng-model="test" xng-clearable />
Actually only input
with type="text"
are supported.
You can install angular-clearable using Bower:
bower install angular-clearable
This code is licensed under The MIT License (MIT).
Original Author: Giacomo Antolini (aka Flocca)