Javascript 在成功转述后发送成功消息
我想在重新加载表之前抛出this.messageDialogService.show('Success',true),并吐司一条消息Javascript 在成功转述后发送成功消息,javascript,angular,typescript,Javascript,Angular,Typescript,我想在重新加载表之前抛出this.messageDialogService.show('Success',true),并吐司一条消息 这就是你要找的吗 .subscribe( // reload table () => { this.realoadTable(); this.messageDialogService.show('Success', true); }, // handle error () =>
这就是你要找的吗
.subscribe(
// reload table
() => {
this.realoadTable();
this.messageDialogService.show('Success', true);
},
// handle error
() => this.messageDialogService.show('Failed', true)
);
那么问题出在哪里呢?你能重新制定你想要实现的目标吗?那么在
this.reloadTable()
()=>this.realoadTable(this.messageDialogService.show('success!File was successfully uploaded')之前,在subscribe
中的success handler arrow函数中添加那一行代码,这是正确的实现吗?"... 这是正确的实现吗?“
← 否。您希望先显示消息,然后重新加载表。不进行重新加载表调用,同时执行显示消息部分。
.subscribe(
// reload table
() => {
this.realoadTable();
this.messageDialogService.show('Success', true);
},
// handle error
() => this.messageDialogService.show('Failed', true)
);