wsuite-notification
Version:
Toast notification for angular 2,4,5,6,7,8+ version.
50 lines (37 loc) • 958 B
Markdown
## Features
- Toast notification for wsuite UI-UX.
- AoT compilation and lazy loading compatible
## Install
```bash
npm install wsuite-notification --save
```
## Setup
**step 1:** add WsuiteNotificationModule to app NgModule
```typescript
import { CommonModule } from '@angular/common';
import { WsuiteNotificationModule } from 'wsuite-notification';
class MainModule {}
```
**step 2:** add in your root component html (Ex. AppComponent)
```html
<wsuite-notification></wsuite-notification>
```
## Use
```typescript
import { NotificationService } from 'wsuite-notification';
export class YourComponent {
constructor(private toastr: NotificationService) {}
showSuccess() {
this.toastr.success('Hello world!', 'Toastr fun!');
}
}
```