Skip to content

A simple AngularJS directive to display a spinner, using spin.js

License

Notifications You must be signed in to change notification settings

bthecohen/ng-spin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

ng-spin

A simple AngularJS directive to display a spinner, using Spin.js

Usage

First, you must make sure the Spinner object from Spin.js is available, either by including its script file or importing it as a module. Then, include the directive in your Angular project.

There are a couple of other directives wrapping this same library. This one is slightly different in that it uses an custom attribute to activate and deactivate the spinner, as opposed to a method call. To create a spinner in your Angular template, use the following syntax:

 <div ng-spin spinning="expression">...</div>

Where expression is a JavaScript expression accessible from within the current scope. While it evaluates to true, the spinner will display.

You can also pass initialization options into the spinner object via the ngSpinOpts attribute. For a comprehensive list of available options, see the Spin.js site.

About

A simple AngularJS directive to display a spinner, using spin.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published