【发布时间】:2019-04-18 08:36:08
【问题描述】:
我已经通过 ngx-toaster 成功展示了 toast。 通过我根据 id 和 taskcode 显示各种类型的通知的烤面包机。
我尝试获取点击回调和操作回调,但没有找到任何回报。
onNotificationReceived(res) {
let key;
switch (key) {
case 1:
showSuccessPopup(res.title,res.body);
break;
default:
break;
}
}
showSuccessPopup(title,body) {
this.toastr
.success(title, body, { closeButton: true })
.onTap.subscribe((action) => console.log(action))
}
实际结果:显示吐司
预期:显示了哪个 id toast
【问题讨论】: