I am implementing the dialog component of material2 and faced this issue:
I want to make a generic dialog for all the confirmation type of messages, where developer can input the text to the dialog as per the business requirement. But as per the docs there are no such provisions. Do we have a work around for the same, or I should post it as a feature request on github?
export class ConfirmationDialogComponent implements OnInit {
@Input() confirmationText: string;
@Input() confirmationTitle: string;
@Input() confirmationActions: [string, string][] = [];
constructor(public dialogRef: MdDialogRef<ConfirmationDialogComponent>) {}
ngOnInit() {}
}
Calling like this:
let dialogRef = this.dialog.open(ConfirmationDialogComponent);