treasure-data / angular-treasure-overlay-spinner

Add a spinner to an element when binding is truthy.
https://treasure-data.github.io/angular-treasure-overlay-spinner/
MIT License
36 stars 17 forks source link

angular-treasure-overlay-spinner

Add a spinner to an element when binding is truthy.

treasure-overlay-spinner requires ngAnimate.

Installation

Usage

angular.module('example', ['treasure-overlay-spinner']);
angular.module('example').run(run);

run.$inject = ['$rootScope'];
function run ($rootScope) {
  $scope.spinner = {active true};
}
<div ng-app='example'>
  <!-- active uses two-way bindings to track the status -->
  <treasure-overlay-spinner active='spinner.active'>
    <p>This will be covered by a spinner when spinner.active is truthy</p>
  </treasure-overlay-spinner>
</div>

Example

Try the example by running:

Or visit the live example.

Scripts