如何定位有角度的材料模态



我试图打开一个模态。

我有一张关于detalis成分的表格

<table>
<tr>
<td>Manager:</td>
<td>EmployeeManger</td>
<td><app-report-to></app-report-to></td>
</tr>
</table>

在部件"中;应用程序报告到";我写了打开模态的函数:

openDialog() {
const dialogRef = this.dialog.open(ReportPopUpComponent,{
width: '50px', height: '50px',
data:{
message: 'Are you sure want to delete?',
buttonText: {
ok: 'Save',
cancel: 'No'
}
}
});

dialogRef.afterClosed().subscribe((confirmed: boolean) => {

});
}

在report.html 中

<button mat-button (click)="openDialog()">Open Confirm Dialog</button>

但模态在左侧向下打开。一些建议?非常感谢

您可以使用;位置";参数以及您的";数据";参数,如中所述https://v5.material.angular.io/components/dialog/api

最新更新