Angular(Material) - 对话框关闭 - 按下了哪个按钮

时间:2018-03-02 01:26:57

标签: dialog angular5

我在Angular 5应用程序中使用此代码:

let dialogRef = this.dialog.open(DatechoiceCreationDateDialogComponent, {
  data: data
});    

dialogRef.afterClosed().subscribe(() => {
    this.fetchEvents(); // events are fetched also if close button is pressed
 })

如果按下关闭按钮,我能以某种方式区分,因为我不需要重新加载/获取事件吗?

0 个答案:

没有答案