Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adonespitogo/angular-loading-spinner
Angular directive for ajax loading indicator. It detects any ajax request and shows the spinner. This directive makes use of https://github.com/urish/angular-spinner.
https://github.com/adonespitogo/angular-loading-spinner
Last synced: about 1 month ago
JSON representation
Angular directive for ajax loading indicator. It detects any ajax request and shows the spinner. This directive makes use of https://github.com/urish/angular-spinner.
- Host: GitHub
- URL: https://github.com/adonespitogo/angular-loading-spinner
- Owner: adonespitogo
- Created: 2014-08-15T19:19:23.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-12-05T19:35:19.000Z (almost 8 years ago)
- Last Synced: 2024-10-09T18:55:39.426Z (about 1 month ago)
- Language: HTML
- Homepage:
- Size: 10.7 KB
- Stars: 77
- Watchers: 8
- Forks: 23
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
angular-loading-spinner
=======================Angular directive ajax loading indicator. This directive uses [urish angular-spinner](https://github.com/urish/angular-spinner) as the loading indicator.
Demo
------------
See [plunker demo](http://plnkr.co/edit/PUjrEIt0YLTwr0rUInv8?p=preview).Usage
--------------------------------
Include dependencies in your application:
- angular.js
- spin.js
- angular-spinner.js
- angular-loading-spinner.js```html
```
Require `ngLoadingSpinner` as dependency in your main module.
```javascript
angular.module('myapp', ['ngLoadingSpinner']);
```Insert [angular-spinner](https://github.com/urish/angular-spinner)'s `us-spinner` directive anywhere in your html file to be shown when there is pending ajax request and will be hidden upon completion of all ajax requests.
This directive also exposes `spinnerActive` model to the `$rootScope` with a boolean value. It can be useful if you want to hide some elements while your application is fetching data from the backend.
You can still use `us-spinner` directly un-affected by ajax request using the `us-spinner-standalone` directive.
Read [angular-spinner docs](https://github.com/urish/angular-spinner) on how to customize the spinner and refer to [spin.js docs](http://fgnass.github.io/spin.js/) for more configuration options.
## License
Released under the terms of MIT License.