【发布时间】:2017-11-15 04:41:51
【问题描述】:
当设备进入空闲状态时,我需要关闭所有当前模态弹出窗口并在 ionic 2 应用程序中注销用户。
我使用以下方法关闭 home 组件中的弹出窗口。
this.viewController.dismiss().then(_ => {
console.log("modal dismiss");
}).catch(error => {
console.log(error)
});
和
this.navController.popAll().then(_ => {
console.log("modal dismiss");
}).catch(error => {
console.log(error);
})
但它会引发以下错误 您无法删除导航堆栈中的所有页面。 nav.pop() 可能被调用了太多次。
并且不会关闭任何弹出窗口。有人知道怎么做吗?
【问题讨论】:
标签: javascript ionic2 angular2-template