任何想法如何設置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) –