Skip to content

Instantly share code, notes, and snippets.

@NaqiNick
Created February 17, 2022 06:42
Show Gist options
  • Save NaqiNick/5ceffe1f1f96c5b2dbf6b7e28acd5d25 to your computer and use it in GitHub Desktop.
Save NaqiNick/5ceffe1f1f96c5b2dbf6b7e28acd5d25 to your computer and use it in GitHub Desktop.
import { Component, Inject, OnInit } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
@Component({
selector: 'app-confirm-dialogue',
templateUrl: './confirm-dialogue.component.html',
styleUrls: ['./confirm-dialogue.component.scss']
})
export class ConfirmDialogueComponent implements OnInit {
constructor(public dialogRef: MatDialogRef<ConfirmDialogueComponent>) {
}
ngOnInit(): void {
}
onConfirm(): void {
// Close the dialog, return true
this.dialogRef.close(true);
}
onDismiss(): void {
// Close the dialog, return false
this.dialogRef.close(false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment