import { MAT_DIALOG_DATA , MatDialogRef } from '@angular/material/dialog' ; import { Component , Inject } from '@angular/core' ; import { DataService } from '../../services/data.service' ; @ Component ( { selector : 'app-delete.dialog' , templateUrl : '../../dialogs/delete/delete.dialog.html' , styleUrls : [ '../../dialogs/delete/delete.dialog.css' ] } ) export class DeleteDialogComponent { constructor ( public dialogRef , @ Inject ( MAT_DIALOG_DATA ) public data , public dataService ) { } onNoClick ( ) { this . dialogRef . close ( ) ; } confirmDelete ( ) { this . dataService . deleteIssue ( this . data . id ) ; } }