2.0.1 • Published 3 years ago

rj-spinner v2.0.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

RjSpinner

This library was generated with https://github.com/angular/angular-cli version 9.1.13.

Installation

rj-spinner is available via npm and yarn

Using npm:

$ npm install rj-spinner --save

Using yarn:

$ yarn add rj-spinner

Using angular-cli:

$ ng add rj-spinner

Usage

Import RjSpinnerModule in in the root module(AppModule):

import { RjSpinnerModule } from 'rj-spinner';

@NgModule({
  imports: [
    RjSpinnerModule,
  ],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}

Add RjSpinnerService service wherever you want to use the rj-spinner.

import { RjSpinnerService } from 'rj-spinner';

class AppComponent implements OnInit {
  constructor(private spinner: RjSpinnerService) {}

  ngOnInit() {
    /** spinner starts on init */
    this.spinner.show();

    setTimeout(() => {
      /** spinner ends after 5 seconds */
      this.spinner.hide();
    }, 5000);
  }
}

Now use in your template

<rj-spinner ></rj-spinner>

See Demo

Methods

  • RjSpinnerService.show() Shows the spinner
  • RjSpinnerService.hide() Hides the spinner
2.0.1

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago