added missing interfaces

This commit is contained in:
Sascha Szott
2024-03-20 11:39:17 +01:00
parent f59510d27e
commit 96748b9bac
31 changed files with 126 additions and 67 deletions

View File

@@ -1,6 +1,8 @@
import {
Component,
Input,
OnDestroy,
OnInit,
} from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { Subscription } from 'rxjs';
@@ -15,7 +17,7 @@ import { AlertType } from '../alert/alert-type';
standalone: true,
imports: [AlertComponent],
})
export class ErrorComponent {
export class ErrorComponent implements OnDestroy, OnInit {
@Input() message = 'Error...';
@@ -31,7 +33,7 @@ export class ErrorComponent {
}
ngOnInit() {
ngOnInit(): void {
if (this.message === undefined) {
this.subscription = this.translate.get('error.default').subscribe((message: string) => {
this.message = message;
@@ -39,7 +41,7 @@ export class ErrorComponent {
}
}
ngOnDestroy() {
ngOnDestroy(): void {
if (this.subscription !== undefined) {
this.subscription.unsubscribe();
}