Giter Site home page Giter Site logo

coreyshuman / angular-loading-spinner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adonespitogo/angular-loading-spinner

0.0 3.0 0.0 11 KB

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.

PHP 1.88% HTML 79.52% JavaScript 18.60%

angular-loading-spinner's Introduction

angular-loading-spinner

Angular directive ajax loading indicator. This directive uses urish angular-spinner as the loading indicator.

Demo

See plunker demo.

Usage

Include dependencies in your application:

  • angular.js
  • spin.js
  • angular-spinner.js
  • angular-loading-spinner.js
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.min.js"></script>
  <script type="text/javascript" src="http://fgnass.github.io/spin.js/spin.min.js"></script>
  <script type="text/javascript" src="angular-spinner.min.js"></script>
  <script type="text/javascript" src="angular-loading-spinner.js"></script>

Require ngLoadingSpinner as dependency in your main module.

  angular.module('myapp', ['ngLoadingSpinner']);

Insert 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 on how to customize the spinner and refer to spin.js docs for more configuration options.

License

Released under the terms of MIT License.

angular-loading-spinner's People

Contributors

adonespitogo avatar louadrien avatar

Watchers

James Cloos avatar Corey Shuman avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.