@manthanankolekar/ng-loader
Version:
A loader for Angular applications
74 lines (54 loc) • 1.54 kB
Markdown
# NgLoader
This is a simple Angular loader library.




## Installation
```bash
npm install /ng-loader
```
## Usage
Import
```typescript
import { Component } from '@angular/core';
import { NgLoaderComponent } from '@manthanankolekar/ng-loader';
export class AppComponent {
title = 'ng-loader';
}
```
Use
```html
<ng-loader [loading]="isLoading" [loaderMessage]="loaderMessage"></ng-loader>
```
```typescript
import { Component } from '@angular/core';
export class AppComponent {
isLoading = false;
loaderMessage = 'Loading, please wait...';
toggleLoader() {
this.isLoading = true;
// Optionally update the loader message here.
setTimeout(() => {
this.isLoading = false;
}, 3000);
}
}
```
## Demo
[Stackblitz](https://stackblitz.com/edit/ng-loader-example)
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.