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