131.1. Notification types (#16)
This commit is contained in:
@ -0,0 +1,7 @@
|
|||||||
|
export enum NotificationType {
|
||||||
|
DEFAULT = 'default',
|
||||||
|
INFO = 'info',
|
||||||
|
SUCCESS = 'success',
|
||||||
|
WARNING = 'warning',
|
||||||
|
ERROR = 'error'
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {NotifierService} from "angular-notifier";
|
import {NotifierService} from "angular-notifier";
|
||||||
|
import {NotificationType} from "../notification/notification-type";
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@ -9,7 +10,7 @@ export class NotificationService {
|
|||||||
constructor(private notifier: NotifierService) {
|
constructor(private notifier: NotifierService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public notify(type: string, message: string): void {
|
public notify(type: NotificationType, message: string): void {
|
||||||
this.notifier.notify(type, message);
|
this.notifier.notify(type, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user