A spinner component and directive for Angular 2-12+
Install via [npm][npm] package manager
npm install @laijuthomas/angular-spinner --save
Import angular-spinner
module
import { HttpClientModule} from '@angular/common/http';
import { AngularSpinnerModule } from '@laijuthomas/angular-spinner';
@NgModule({
imports: [ HttpClientModule, AngularSpinnerModule ]
})
Then in HTML
<angular-spinner></angular-spinner>
Input | Type | Default | Required | Description |
---|---|---|---|---|
size | string |
medium |
no | Set custom sizes like xxsmall, xsmall, small, medium, large, xlarge, xxlarge |
status | string |
active |
no | Set custom status like active, disabled, primary, info, success, warning, danger |
message | string |
- |
no | Custom message to show along with the loader |
To use as directive pass a boolean variable to the directive
<div [angularSpinner]="loading"></div>
Input | Type | Default | Required | Description |
---|---|---|---|---|
spinnerSize | string |
medium |
no | Set custom sizes like xxsmall, xsmall, small, medium, large, xlarge, xxlarge |
spinnerStatus | string |
active |
no | Set custom status like active, disabled, primary, info, success, warning, danger |
spinnerMessage | string |
- |
no | Custom message to show along with the loader |
Within the download you'll find the following directories and files. You'll see something like this:
angular-spinner/
└── projects/
├── angular-spinner/
└── angular-spinner-app/
angular-spinner/
- library
angular-spinner-app/
- demo application
Laiju Thomas