Files
cbsnexora/src/app/core/alert.service.ts
T
Abhay ChawlaandGitHub 2330f70f2c refractor: login module (#283)
* Refractor components.
* Shift language and footer component to shared module.
* Replace mat-icons by font-awesome icons.
* Add comments.

Fixes #284
2018-08-09 22:28:17 +05:30

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