@accubits/spinner
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Spinner

A Library to easily create your own custom loaders for pages. The spinner allows create your own HTML and use the SpinnerService to control it in your whole project.

Demo

View the demo here

Installation

Install spinner via npm

$ npm install @accubits/spinner --save

Usage

Import SpinnerModule in in the root module:

// Import library module
import { SpinnerModule } from '@accubits/spinner';

@NgModule({
  imports: [
    // ...
    SpinnerModule
  ]
})
export class AppModule { }

Add SpinnerService where you want to use the spinner.

import { SpinnerService } from '@accubits/spinner';

class ExampleComponent implements OnInit {

  constructor(private spinner: SpinnerService) { }

  ngOnInit() {
    
    this.spinner.show();

    setTimeout(() => {
       
        this.spinner.hide();
    }, 3000);
  }
}

Now use in your template

<ab-spinner></ab-spinner>

Spinner Service

  • SpinnerService.show()
  • SpinnerService.hide()

Custom HTML

<ab-spinner type="custom">
  <p class="spinner">
    <img src="assets/images/loader.gif" />
    <span>LOADER....</span>
  </p>
</ab-spinner>

Additional Options

Go to GITHUB for more options

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.20latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.20
1.1.10
1.1.00
1.0.51
1.0.40
1.0.30
1.0.21
1.0.11
1.0.00
0.3.03
0.2.00
0.1.10
0.1.00
0.0.31
0.0.21
0.0.11

Package Sidebar

Install

npm i @accubits/spinner

Weekly Downloads

9

Version

1.1.2

License

MIT

Unpacked Size

140 kB

Total Files

29

Last publish

Collaborators

  • accubitstechnologies
  • dittops
  • shiby