how to open Md-dialog full screen angular4?

Shailesh Ladumor picture Shailesh Ladumor · Mar 28, 2018 · Viewed 20k times · Source

I am trying to pass some property value using config. But dialog not open into full screen.

openTwigTemplate(): void {
  let config = new MdDialogConfig();
  config = {
    position: {
      top: '10px',
      right: '10px'
    },
    height: '98%',
    width: '100vw',
  };
  const dailog = this.dialog.open(TwigDialogComponent, config);
}

How can I open dialog full screen based on resolution?

Answer

San Jaisy picture San Jaisy · Oct 23, 2018

This work for me

let dialogRef = this.dialog.open(CustomerGarageAddEditComponent, {
      maxWidth: '100vw',
      maxHeight: '100vh',
      height: '100%',
      width: '100%'
    });

Source

https://github.com/angular/material2/issues/9823