【发布时间】:2019-10-04 18:40:26
【问题描述】:
当我发出 HTTP 请求时,我正在打开加载 MatDialog。但是,当我尝试在调用的订阅中关闭它时,它并没有关闭它。
我做错了什么?
saveListOfSteps(isFormValid: boolean): void{
if(isFormValid== false){
alert("You have not filled out all fields in the form! Fix that first");
}else{
// show a loading dialog
let dialogRefLoading = this.dialog.open(PopupComponent, {
width: '250px',
data: {
data: ["Loading..."],
showCloseButton: false},
},
);
dialogRefLoading.close;
this.SelfServiceDetailsService.saveListOfSteps(this.validationSteps)
.subscribe(response=>{
dialogRefLoading.close;
this.showSaveResultsDialog(response.body),
error => alert("An error occured")});
}
}
【问题讨论】:
-
您缺少括号。
标签: angular typescript