* Refractor components. * Shift language and footer component to shared module. * Replace mat-icons by font-awesome icons. * Add comments. Fixes #284
24 lines
371 B
TypeScript
24 lines
371 B
TypeScript
import { Injectable, EventEmitter } from '@angular/core';
|
|
|
|
export interface Alert {
|
|
type: string;
|
|
message: string;
|
|
}
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class AlertService {
|
|
|
|
public alertEvent: EventEmitter<Alert>;
|
|
|
|
constructor() {
|
|
this.alertEvent = new EventEmitter();
|
|
}
|
|
|
|
alert(alertEvent: Alert) {
|
|
this.alertEvent.emit(alertEvent);
|
|
}
|
|
|
|
}
|