32 lines
714 B
TypeScript
32 lines
714 B
TypeScript
import { MatDialogRef } from '@angular/material';
|
|
import { MAT_DIALOG_DATA } from '@angular/material';
|
|
import { Component, OnInit, Inject } from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'app-yes-no-popup',
|
|
templateUrl: './yes-no-popup.component.html',
|
|
styleUrls: ['./yes-no-popup.component.css']
|
|
})
|
|
export class YesNoPopupComponent implements OnInit {
|
|
|
|
public title: string;
|
|
public message: string;
|
|
|
|
constructor(@Inject(MAT_DIALOG_DATA) public data: any, private MatDialogRef: MatDialogRef<YesNoPopupComponent>) {
|
|
this.title = data.title;
|
|
this.message = data.message;
|
|
}
|
|
|
|
ngOnInit() {
|
|
}
|
|
|
|
yes(){
|
|
this.MatDialogRef.close(true);
|
|
}
|
|
|
|
no(){
|
|
this.MatDialogRef.close(false);
|
|
}
|
|
|
|
}
|