diff --git a/src/auth/module/services/alert.service.spec.ts b/src/auth/module/services/alert.service.spec.ts new file mode 100644 index 0000000..67621ff --- /dev/null +++ b/src/auth/module/services/alert.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { AlertService } from './alert.service'; + +describe('AlertServiceService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [AlertService] + }); + }); + + it('should be created', inject([AlertService], (service: AlertService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/auth/module/services/alert.service.ts b/src/auth/module/services/alert.service.ts new file mode 100644 index 0000000..722498e --- /dev/null +++ b/src/auth/module/services/alert.service.ts @@ -0,0 +1,15 @@ +import {EventEmitter, Injectable} from '@angular/core'; +import {IAlert} from '../../..'; + +@Injectable() +export class AlertService { + + alerts: Array = []; + onNewAlert: EventEmitter = new EventEmitter(); + + + constructor() { + this.onNewAlert.subscribe((alert: IAlert) => this.alerts.push(alert) + ); + } +}