import { Component , Inject , Injectable } from '@angular/core' ; import { MatDialogRef , MAT_DIALOG_DATA , MatDialog } from '@angular/material' ; @ Component ( { templateUrl : 'error-dialog.component.html' } ) export class ErrorDialogComponent { constructor ( private dialogRef , @ Inject ( MAT_DIALOG_DATA ) public data ) { } public closeDialog ( ) { this . dialogRef . close ( ) ; } }