0.0.2 • Published 5 years ago
simple-ng-notification v0.0.2
simple-ng-notification
Install
npm i simple-ng-notification
Usage
app.module
import { NotificationService, NotificationModule } from 'simple-ng-notification';
add the notification anchor tag to app.component.html
<sng-notification></sng-notification>
in your code:
import { NotificationService } from 'simple-ng-notification';
///
constructor (
private notificationService: NotificationService,
) { }
// displays a "test message" notification for 4 seconds
notify() {
this.notificationService.notify('test message');
}
// toggles a busy spinner in center of window
_busy = false;
busy() {
this._busy = !this._busy;
this.notificationService.busy = this._busy;
}