@mikelgo/ngx-loader
v13.0.1
Published
A nice lib to show an overlay loading indicator.
Downloads
3
Readme
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.