1.0.0 • Published 9 years ago
angular-clear-field v1.0.0
Angular Clear Input Field Directive
This repo consists of an angularJs directive which is used to clear the input fields.
Install
You can install this package using bower.
bower install angular-clear-field
Then add below <script>
and <link>
tag to your index.html
file
<script src="bower_components/angularClearFieldDirective/script.js"></script>
<link rel="stylesheet" href="bower_components/angularClearFieldDirective/css/custom.css">
Inject Module Dependency
Inject directive.clearField
module
var app = angular.module("myApp", ["directive.clearField"]);
Dependencies
How to use
- To use this directive add
clear-field
attribute to your input or textarea field.
<input type="text" ng-model="name" clear-field>
For textarea
,
<textarea cols="30" rows="10" ng-model="name" clear-field></textarea>
Demo
Demo Plunkr
1.0.0
9 years ago