mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-11 20:13:07 +00:00
added missing interfaces
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user