MatDialogConfig has a 'data' property. Maybe this is the place for own properties ?
MatDialogConfig is the second parameter of the open method.
Edit: When I understand it correctly. In your own dialog component you can than later access the MatDialogRef in your constructor.
Edit:
This looks better:
you can inject the data.
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; .... export class YourDialogComponent { constructor( @Inject(MAT_DIALOG_DATA) public data: any, public dialogRef: MatDialogRef<YourDialogComponent > ) {....}
Ok
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
MatDialogConfig has a 'data' property.
Maybe this is the place for own properties ?
MatDialogConfig is the second parameter of the open method.
Edit:
When I understand it correctly.
In your own dialog component you can than later access the MatDialogRef in your constructor.
Edit:
This looks better:
you can inject the data.
Ok