【未解决】angular nebular toastrService.show can‘t trigger
问题解决:
待排查
问题描述:
想要做一个全局拦截器,用来针对所有出错的http 请求,通知用户出错且显示出错提示。主要代码如下,只要错误是401,弹框不能成功触发。
if (error?.status === 401) {
this.toastrService.show(message, title); // 期望有弹框提示,但是没有
this.router.navigate(['/login']);
} else if (error?.status >= 500) {
this.to
原创
2022-05-25 15:03:04 ·
163 阅读 ·
0 评论