This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
bee-frontend-ARCHIVED/src/app/core/services/notification.service.ts
2024-08-30 21:35:28 +00:00

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);
}
}