generated from flo/template-frontend
14 lines
472 B
TypeScript
14 lines
472 B
TypeScript
import { Injectable } from "@angular/core";
|
|
import { BehaviorSubject, Observable, Subject } from "rxjs";
|
|
import { NotificationElement } from "../components/notification-bar/notification-bar.component";
|
|
|
|
@Injectable()
|
|
export class NotificationService {
|
|
notification$ = new Subject<NotificationElement>();
|
|
|
|
push(notification: NotificationElement): void {
|
|
console.log(notification.type + ": " + notification.message);
|
|
this.notification$.next(notification);
|
|
}
|
|
}
|