1.0.2 • Published 9 years ago
ion-emptying-button v1.0.2
ion-emptying-button
This repo is for distribution on
npmandbower.The source for this module is a plugin of ionic framework for emptying input model and value.
Language
Read this in other languages: English / 中文
Table of Contents
Installation
You can install this package either with npm or with bower.
- npm
npm install ion-emptying-buttonThen add ion-emptying-button as a dependency for your app:
angular.module('myApp', [require('ion-emptying-button')]);- bower
bower install ion-emptying-buttonAdd a <script> to your index.html:
<script src="/bower_components/ion-emptying-button/ion-emptying-button.js"></script>Then add ion-emptying-button as a dependency for your app:
angular.module('myApp', ['ion-emptying-button']);Usage
Add an attr named 'emptying-button' to your input tag, and then it will automatically add the emptying button to the end of input.
<input type="text" ng-model="vm.date.name" emptying-button/>- eb-icon set the button icon class name, default
ion-ios-close. - eb-color set the button icon color, default
#ABABAB. - eb-font-size set the button icon size.
- eb-right set the button distance the input right border, default
4px.
<input type="text" ng-model="vm.date.name" emptying-button eb-color="red" eb-right="4px" eb-font-size="15px" eb-icon="ion-android-close"/>Demo
demo is coming soon
License
The MIT License