Add a spinner to an element when binding is truthy.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist update css Jan 27, 2015
src update css Jan 27, 2015
test refactor to use css instead Jan 26, 2015
.bowerrc
.editorconfig create angular-treasure-overlay-spinner Jan 26, 2015
.gitignore create angular-treasure-overlay-spinner Jan 26, 2015
.jshintrc
LICENSE
README.md refactor to use css instead Jan 26, 2015
bower.json
index.html refactor to use css instead Jan 26, 2015
karma.conf.js refactor to use css instead Jan 26, 2015
package.json

README.md

angular-treasure-overlay-spinner

Add a spinner to an element when binding is truthy.

treasure-overlay-spinner requires ngAnimate.

Installation

  • bower install angular-treasure-overlay-spinner
  • add angular-treasure-overlay-spinner/src/treasure-overlay-spinner.js to your html
  • add angular-treasure-overlay-spinner/src/treasure-overlay-spinner.cssto your html
  • add treasure-overlay-spinner as an angular module dependency

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:

  • npm install
  • bower install
  • npm run example

Or visit the live example.

Scripts

  • npm run example - run example server and open browser
  • npm run build - minify and copy to dist folder
  • npm run tdd - run tests whenever files change
  • npm run test - run tests