- Notifications
You must be signed in to change notification settings - Fork0
Angular (typescript) Spinner. Wrapper around spinner:http://spin.js.org/
slavede/ng-ts-spinner
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Angular (typescript) Spinner. Wrapper around spinner:http://spin.js.org/ (<3.0.0 version).
It has dependency on spin.js. It doesn't include it in bundle so you have to isntall it yourself (<3.0.0 until #3 is fixed).
npm install spin.js@2.x --savenpm install ng-ts-spinner --save
In case you are using Angular CLI, add spin.js (it will be downloaded together with ng-ts-spinner module) to your scripts path:
"scripts": ["../node_modules/spin.js/spin.min.js"]
import { NgTsSpinnerModule } from 'ng-ts-spinner';. . .@NgModule({ . . . imports : [ . . . NgTsSpinnerModule ]
<div ng-ts-spinner [spinOn]="loadingInProgress" [options]="spinnerOptions"> <div>Everything here will be under the spinner</div> </div>
spinOn - when set to true, spinner spins, when false, spinner is removed
overlayWhileSpin - if true, it will display overlay, making everything non-clickable where it is spinning (make sure parent element has positioning set)
spinnerOptions - options based on options fromhttp://spin.js.org/. It can be empty, it will use defaults
When changing spinnerOptions, spinner should be stopped, and then again spin to apply changes of the options.
Breaking change: Added support for Angular6+. Now only support Angular6+, for below version, use 1.6.x
- New way of installing dependency.Spin.js has to be installed manually (since npm3+ doesn't install dependency automatically).
BREAKING CHANGE: Change the way you import module to:
import{NgTsSpinnerModule}from'ng-ts-spinner';
- Added support for overlayWhileSpin
- Added index.ts to have nicer import (only name of the module)
- Restricted spin.js dependency to be under 3.0.0 because 3.0.0 removed spin.min.js.
- Spinner doesn't add extra div to the placeholder
About
Angular (typescript) Spinner. Wrapper around spinner:http://spin.js.org/
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.