I have a unique setup with a custom MaterialDialogConfig file dedicated to handling all of my material dialog components. Here's what the configuration file looks like:
import { MatDialogConfig } from "@angular/material";
export class MaterialDialogConfig extends MatDialogConfig {
constructor(data: any = {}, width: string = "720px") {
super();
this.data = data;
this.width = width;
this.hasBackdrop = true;
this.disableClose = true;
this.closeOnNavigation = true;
}
}
In addition, one of my dialog components is structured as follows:
constructor(
private service: AppService,
public dialogRef: MatDialogRef<DIALOGCOMPONENT>,
@Inject(MAT_DIALOG_DATA) public data: any
) {}
ngOnInit() {}
I am seeking a method to transform the width property into an input that can be customized for each individual dialog component instance. How can I achieve this?