@mikelgo/ngx-loader
TypeScript icon, indicating that this package has built-in type declarations

13.0.1 • Public • Published

ngx-loader

A nice lib to show an overlay loading indicator.

Install

npm i @mikelgo/ngx-loader

Usage

Import the NgxLoaderModule in your app.module.ts

import { NgxLoaderModule } from '@mikelgo/ngx-loader';

@NgModule({
  imports: [
    NgxLoaderModule
  ]
})
export class AppModule { }

Optionally you can pass a config object to the module to customize the loader.

import { NgxLoaderModule } from '@mikelgo/ngx-loader';

@NgModule({
  imports: [
    NgxLoaderModule.forRoot({
      loaderComponent: MyCustomLoaderComponent,
      backdropClass: 'my-custom-backdrop-class'
    })
  ]
})
export class AppModule { }

Finally you will use it like this:

<ngx-loader [show]='loading$ | async'>
  <ng-template>
    <div> Some content I want to show</div>
  </ng-template>
</ngx-loader>

Compatibility

Version 13.x.x is compatible with Angular 13.x.x.

Running unit tests

Run nx test ngx-loader to execute the unit tests.

Readme

Keywords

none

Package Sidebar

Install

npm i @mikelgo/ngx-loader

Weekly Downloads

0

Version

13.0.1

License

none

Unpacked Size

21.6 kB

Total Files

11

Last publish

Collaborators

  • mikelgo