成功订阅后,Angular Toast会发送成功消息

时间:2020-07-08 18:20:48

标签: javascript angular typescript

我想在重新加载表格之前吐出this.messageDialogService.show('Success',true),敬酒一条消息。

 .subscribe(
    // reload table
    () => this.realoadTable() ,
    // handle error
    () => this.messageDialogService.show('Failed', true)
  );

1 个答案:

答案 0 :(得分:1)

这是您要找的吗?

 .subscribe(
    // reload table
    () => {
        this.realoadTable();
        this.messageDialogService.show('Success', true);
    },
    // handle error
    () => this.messageDialogService.show('Failed', true)
  );