ngx-z-notifications
v1.0.2
Published
Simple notifications library for Angular 7.
Downloads
3
Readme
Z Notifications
Simple notifications library for Angular 7.
Install:
npm i ngx-z-notifications
Update your app.module.ts:
import { ZNotificationsModule } from 'ngx-z-notifications';`
@NgModule({
declarations: [AppComponent],
imports: [
...
ZNotificationsModule.forRoot({
timeout: 6000
})
],
bootstrap: [AppComponent]
})
Add the ngx-z-notifications
to your AppComponent
.
import {ZNotificationsService} from 'ngx-z-notifications';
import {Component, OnInit} from '@angular/core';
@Component({
selector: 'app-root',
template: `
<ngx-notifications-list></ngx-notifications-list>
`
})
export class AppComponent implements OnInit {
constructor(private notifications: ZNotificationsService) {
}
ngOnInit() {
this.notifications.error('SHEF! VSIO PROPALO');
this.notifications.warn('I need your clothes and moto');
this.notifications.info('I`ll be back');
}
}