A lightweight ladda alternative for Angular. [Demo]
- Angular
- ngAnimate
- IE10+, Chrome, FF, Opera with animations
- IE9 without animations (but functional)
bower install angular-ladda-lw --save
or
npm install angular-ladda-lw --save
You need the js and css files.
bower_components/angular-ladda-lw/dist/angular-ladda-lw.js
bower_components/angular-ladda-lw/dist/angular-ladda-lw.css
You can also use the angular-ladda-lw.min.* if you want.
angular.module('myApp', ['angular-ladda-lw']);<button class="my-button" ladda="ctrl.loading" ng-click="ctrl.doThing(thing)">Hello, world!</button>this.doThing = thing => {
this.loading = true;
MyService.doThing(thing).then(res => {
// TODO
}, err => {
// Stuff broke
}).finally(() => {
this.loading = false;
});
}npm install -g babel-cli babel-preset-es2015 node-sass uglify-js sass-lint eslint karma-cli http-server
npm install
npm start
From project directory:
http-server . -o
Then go to http://localhost:8080/demo/
The spinner is stolen from chieffancypants/angular-loading-bar, so if you decide to use that, this project will look consistent and professional. :)
