-2

I want to create a component like angular material dialog but dont want to use that. I want to create a component and pass that a component and show it in the modal.

How can I create a component to show other component in the modal and can resize the width and height (in angular dialog can not the size or i can use the ngDeep but i can not use that because it effective other dialogs) ?

Striped
  • 2,544
  • 3
  • 25
  • 31
  • 1
    For set width and height you can use config (https://material.angular.io/components/dialog/api#MatDialogConfig) – izmaylovdev May 25 '20 at 13:10
  • In mat dialog you can use, e.g. 50% to heigth or to width, if you want a resizable modal, take a look https://stackoverflow.com/questions/56776046/how-to-make-angular-material-dialog-re-sizable-in-angular-7 – Eliseo May 25 '20 at 16:01
  • Minor corrections – Striped May 26 '20 at 07:22
  • You can also change styles of specific dialog by adding `panelClass`. This [answer](https://stackoverflow.com/a/48689004/11719787) might be helpful. – Sameer May 26 '20 at 07:32
  • Any solution around this question? – Stefani Toto Feb 09 '23 at 17:55

1 Answers1

0

Angular MatDialg based on overlay. You can use OverlayModule for creating you own modals service.

But if you just need to set height and width of modal you can handle it with MatDialogConfig

izmaylovdev
  • 1,828
  • 8
  • 16