thank you for reading.
I have been attempting to open a dialog box with a set size. Ideally being 90% in width, however I am having trouble doing so. Could anyone point me in the right direction (or just tell me the answer).
I believe it has to be set in the call to open the box which is as follows:
readMe({title,img,date,content}:Blog):void{
const dialogConfig = new MatDialogConfig();
dialogConfig.data = {
title,
img,
date,
content,
};
const dialogRef=this.dialog.open(BlogPostComponent,dialogConfig);
}
Thanks in advance,
You can add width and height properties to your
dialogConfig
, ieThere's also maxWidth and maxHeight properties if necessary, see the docs.