任何想法如何设置MdDialog的位置?无法使用MdDialogConfig设置Angular Material 2对话框的位置
openDialog() {
let config = new MdDialogConfig();
config.height = '15px';
config.position.left = '5px';
let dialogRef = this.dialog.open(BasicAlertDialog, config);
dialogRef.componentInstance.title = this.dialogTitle ;
dialogRef.componentInstance.text = this.dialogText ;
dialogRef.componentInstance.yes = this.dialogYes ;
dialogRef.componentInstance.no = this.dialogNo ;
我可以设置高度,但设置在Error“错误类型错误位置的结果:在AppComponent.webpackJsonp.267.AppComponent.openDialog的不确定 无法设置属性‘左’(app.component.ts :385)”。第385行是我尝试将左侧位置设置为5px的位置。
[2角的材料可能的复制。对话框不显示在中间](https://stackoverflow.com/questions/41414964/angular-2-material-dialog-box-not-showing-in-the-middle) –