You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
698 B
TypeScript
22 lines
698 B
TypeScript
|
1 week ago
|
import { Component } from '@angular/core';
|
||
|
|
import { Observable } from 'rxjs';
|
||
|
|
import { NotificationService } from '../../services/notification.service';
|
||
|
|
import { CommonModule } from '@angular/common';
|
||
|
|
|
||
|
|
@Component({
|
||
|
|
selector: 'app-notifications',
|
||
|
|
imports: [CommonModule],
|
||
|
|
templateUrl: './notifications.component.html',
|
||
|
|
styleUrl: './notifications.component.scss'
|
||
|
|
})
|
||
|
|
export class NotificationsComponent {
|
||
|
|
notifications$: Observable<{ type: string; message: string; } | null>
|
||
|
|
|
||
|
|
constructor(private notificationService: NotificationService) {
|
||
|
|
this.notifications$ = this.notificationService.notifications$;
|
||
|
|
}
|
||
|
|
clearNotification() {
|
||
|
|
this.notificationService.clearNotification();
|
||
|
|
}
|
||
|
|
}
|