0
votes

I am trying to centre the Angular material dialog component within the mat-drawer-content component rather than the full screen, which is the default behaviour.

I have an always open mat-drawer on the left and the application's main content in the mat-drawer-content on the right. Here is an image of the dialog component open for a visual. image

1

1 Answers

0
votes

Sorry but you can't do that with MatDialog. Because it use under the hood the CDK overlay global position strategy (https://github.com/angular/components/blob/master/src/material/dialog/dialog.ts#L209) and unfortunatly it's not overridable.

If you really want this behavior you should use CDK overlay to build your own dialog-like component (https://material.angular.io/cdk/overlay/overview).