Newer
Older
Website / src / app / alert / alert.component.ts
import { Component, Inject, OnInit } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';

@Component({
  selector: 'app-alert',
  templateUrl: './alert.component.html',
  styleUrls: ['./alert.component.scss']
})
export class AlertComponent implements OnInit {
  constructor(
              @Inject(MAT_DIALOG_DATA) public data: {title: string, content: string},
              private dilogRef: MatDialogRef<AlertComponent>) { }

  ngOnInit(): void {
  }

  onClose() {
    this.dilogRef.close()
  }
}