UNPKG

pulseauthenticate

Version:

Common Authentication library for pulse angular apps

24 lines (18 loc) 528 B
import { Component, OnInit } from '@angular/core'; import { AlertService } from '../services/alert.service'; declare var $:any; @Component({ selector: 'alert', templateUrl: 'alert.component.html' }) export class AlertComponent { message: any; constructor(private alertService: AlertService) { } ngOnInit() { this.alertService.getMessage().subscribe(message => { this.message = message; }); } closeAlert() { this.alertService.clearAlert(); } }