import {Component, OnInit} from '@angular/core';
import {MessagingService} from '../../public/services/messaging.service';

@Component({
  selector: 'app-notification',
  templateUrl: './notification.component.html'
})
export class NotificationComponent implements OnInit {
  today: number = Date.now();
  message;
  constructor(private msg: MessagingService,
  ) {
  }

  ngOnInit() {

    this.msg.getPermission();
    this.msg.receiveMessage();
    this.message = this.msg.currentMessage;
  }
}
