1.1.0 • Published 9 years ago
angular-click-and-wait v1.1.0
angular-click-and-wait
Simple angular directive to prevent user from clicking multiple times on a element when performing an asynchronous action.
Install
Install with npm or bower
npm
npm install --save click-and-waitBower
bower install --save click-and-wait
Usage
Add the
clickAndWaitdirective as a dependency for your appangular.module('myApp', ['clickAndWait']);Use the
clickAndWaitdirective in any element<button click-and-wait="asyncAction()"></button>
The asynchronous action passed as argument should be a Promise.
Contributing
Dependencies
npmyarn
Run yarn install to install dependencies
Development
- Fork it!
- Create your feature branch
git checkout -b feature/my-new-feature - run
yarn tdd - Write ES6/ES2015+ code using the Airbnb Style Guide
- run
yarn buildto build the new version - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature/my-new-feature - Submit a pull request 😁
License
This project is licensed under the MIT License - see the LICENSE file for details