Angular material dialog component hides all my website components

前端 未结 8 2435
野趣味
野趣味 2021-02-14 08:05

I\'m using angular 5 and angular material (latest version) and I\'m trying to open a dialog from a page. When I click the button that triggers the opening, the entire website is

8条回答
  •  感动是毒
    2021-02-14 08:48

    See the API Docs for MatDialogConfig. You can set hasBackdrop to false.

        const dialogRef = this.dialog.open(DialogComponent, {
            width: '250px',
            data: { name: 'Juan Manuel', animal: 'Perro' },
            hasBackdrop: false
        });
    

提交回复
热议问题