Ionic 3.1.1 使用带推送的 ionViewCanEnter 没有捕捉到错误响应
Ionic 3.1.1 using ionViewCanEnter with push did not catch the false response
在从 Ionic 3.0.1 升级到 Ionic 3.1.1 之前,这个问题不存在。
升级到 Ionic 3.1.1 后,使用 NavGuard 推送到页面,navCtrl.push().catch 没有捕捉到错误。
在我的 RequestPage 中,我写了这个 NavGuard:
ionViewCanEnter():boolean {
return this.auth.authUser();
}
在我的主页中,我将此推送到 RequestPage
pushRequest() {
this.navCtrl.push('RequestPage')
.catch(()=> this.pushLogin());
}
这应该会弹出登录页面,但现在完全没有效果,也没有错误。
在寻找答案后,我看到它已添加到 github 上的 Ionic 3.2.0 里程碑中,我想这是 Ionic 3.1.0 以来的一个问题
在从 Ionic 3.0.1 升级到 Ionic 3.1.1 之前,这个问题不存在。
升级到 Ionic 3.1.1 后,使用 NavGuard 推送到页面,navCtrl.push().catch 没有捕捉到错误。
在我的 RequestPage 中,我写了这个 NavGuard:
ionViewCanEnter():boolean {
return this.auth.authUser();
}
在我的主页中,我将此推送到 RequestPage
pushRequest() {
this.navCtrl.push('RequestPage')
.catch(()=> this.pushLogin());
}
这应该会弹出登录页面,但现在完全没有效果,也没有错误。
在寻找答案后,我看到它已添加到 github 上的 Ionic 3.2.0 里程碑中,我想这是 Ionic 3.1.0 以来的一个问题