angular-clear-input

WebJar for angular-clear-input

License

License

MIT
Categories

Categories

Angular User Interface Web Frameworks
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

angular-clear-input
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

angular-clear-input
WebJar for angular-clear-input
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/one-logic/angular-clear-input

Download angular-clear-input

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/angular-clear-input/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>angular-clear-input</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/angular-clear-input/
implementation 'org.webjars.bower:angular-clear-input:0.1.0'
// https://jarcasting.com/artifacts/org.webjars.bower/angular-clear-input/
implementation ("org.webjars.bower:angular-clear-input:0.1.0")
'org.webjars.bower:angular-clear-input:jar:0.1.0'
<dependency org="org.webjars.bower" name="angular-clear-input" rev="0.1.0">
  <artifact name="angular-clear-input" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='angular-clear-input', version='0.1.0')
)
libraryDependencies += "org.webjars.bower" % "angular-clear-input" % "0.1.0"
[org.webjars.bower/angular-clear-input "0.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Angular Clear Input

A simple AngularJS plugin that adds a clear button to input boxes

Installation

  1. Download and import the plugin script.
    <script type="text/javascript" src="lib/angular-clear-input/angular.dcb-clear-input.min.js"></script>
  2. Add dcbClearInput to your angular app module dependencies list.
    angular.module('myAngularApp', ['dcbClearInput']);
  3. Add the clear-input attribute to yout input
    <input type="text" ng-model="myModel" clear-input />

Usage

  • Simple usage:
    <input type="text" ng-model="myModel" clear-input />

  • Using on a textarea:
    <textarea ng-model="myModel" clear-input></textarea>

  • Expression:
    <input type="text" ng-model="myModel" clear-input="myModel = 'newVal'" />

  • Function Call:
    <input type="text" ng-model="myModel" clear-input="doSomething()" />

Advanced options

  • Add a class to the appended button, Defaults to: 'clear-btn'.
    <input type="text" ng-model="myModel" clear-input clear-btn-class="custom-class" />

  • Replace the button HTML markup with a custom one, Defaults to: 'X'.
    <input type="text" ng-model="myModel" clear-input clear-btn-markup="<img src='clear.png' />" />

  • Prevant the automatic toggling of the css visibilty property for the clear button
    <input type="text" ng-model="myModel" clear-input clear-disable-visibility="true" />

org.webjars.bower

ONE LOGIC

Smart Data IT-Consulting

Versions

Version
0.1.0