0.0.4 • Published 5 years ago

ngx-loading-indicator v0.0.4

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

npm version Downloads

Purpose

Easily show and hide a loading indicator using a service.

Usage

Install from npm (https://www.npmjs.com/package/ngx-loading-indicator)

npm install --save ngx-loading-indicator

Import the indicator module to your module

import {
  NgxBarIndicatorModule,
  NgxSpinnerIndicatorModule
} from "ngx-loading-indicator";

Inject the services and use them.

import {
  NgxBarIndicatorService,
  NgxSpinnerIndicatorService
} from 'ngx-loading-indicator';

export class AppComponent {
  constructor(
    public spinnerIndicator: NgxSpinnerIndicatorService,
    public barIndicator: NgxBarIndicatorService,
  ) {
    this.spinnerIndicator.show();
    this.spinnerIndicator.hide();
    this.spinnerIndicator.reset();
  }
}