import { Component, Inject, OnInit } from '@angular/core';
import { MdDialogRef, MD_DIALOG_DATA } from '@angular/material';
import { ContactService } from '../../contact.service';

@Component({
  selector: 'app-announcement',
  templateUrl: './announcement.component.html',
  styleUrls: ['./announcement.component.scss']
})
export class AnnouncementComponent implements OnInit {
  announcement
  constructor(public dialogRef: MdDialogRef<AnnouncementComponent>,private contactService: ContactService,
    @Inject(MD_DIALOG_DATA) public data: any) { 
      console.log(data,"In Announcement-----------")
      if(Object.keys(data).length === 0){
        this.announcement="There is no Announcement"
      }else{
        this.announcement=data

      }
    }

  ngOnInit() {
  }

}
