Skip to content

angularifyjs/angular-spinner

Repository files navigation

angular-spinner Build Status Coverage Status

Spinner directive based on $http interceptor

Usage

Installing

Download the Production version or the Development version.

Or download it with bower: open terminal and run

bower install bower-angular-spinner

Include js files into your web page:

<script type="text/javascript" src="[...]/spinner[.min].js"></script>

Add dependency to your app module:

angular.module('your-app-name', [
  'angular-spinner'
]);

The spinner module is now installed. It exposes the SpinnerConfig factory and spinner directive into your app.

Using

Directive

<div spinner="">
  <img src="./images/wait_icon.gif" />
</div>
angular.module('app', [
  'angular-spinner'
]);

Event listener

angular.module('app', [
  'angular-spinner'

]).run(function(){
  $scope.$on(SpinnerConfig['_START_REQUEST_'], function() {
    // To-do
  });
  $scope.$on(SpinnerConfig['_END_REQUEST_'], function() {
    // To-do
  });

});

SpinnerConfig

SpinnerConfig.isSpinning

Type: boolean

Check spinning or not

SpinnerConfig.pendingRequests

Type: integer

Number of pending requests

Documentation

See Getting started

Release History

See CHANGELOG.md

Contributing

See CONTRIBUTING.md

License

MIT - Copyright (c) 2014 Angularfiy.org & HenryTao.

About

Spinner directive based on $http interceptor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published