【发布时间】:2020-10-30 14:57:02
【问题描述】:
尝试使用 Angular 材质对话框或任何弹出窗口组件。有以下工作,除了最后一个主题。
a) 返回原始屏幕不应灰显,
b) 用户允许在其后面的原始第一个窗口中单击返回
c) 将数据发送回原始窗口组件。
d) 允许用户将模式/弹出窗口移动到第二个监视器屏幕,双监视器。这不起作用。
只是它应该是常规弹出窗口。 如何在 Angular Material Dialog 中做到这一点?
public openPropertySearchDialog(): void {
const propertySearchDialogRef = this.openPropertySearchDialog.open(DocumentPropertyGridComponent, {
width: '800px',
height: '450px',
disableClose: true,
autoFocus: false,
data: "test",
hasBackdrop: false
});
propertySearchDialogRef.afterClosed().subscribe(result => {});
}
我们可以使用 javascript window.open,但更喜欢提供完整数据绑定通信服务的 Angular Material。 如果有其他 Angular 选项,也可以作为答案。
基本上用户按下组件 1:“添加文档”变量:selectedDocumentList: Array<string>,并发送数据箭头组件 2:cumulativeDocumentList: Arrays<string>。累积列表实时更新。让它与材料窗口对话框一起使用。
资源:
【问题讨论】:
标签: angular typescript angular-material angular8 material-dialog