我使用IONIC-2 Beta版制作了一个应用程序,我正在尝试在关闭应用程序之前获得警报。
在我使用的前一个版本的ionic 2中,
This Code
但在较新的版本中,这不起作用。
它是如何使用Type Script + ionic 2的?
发布于 2017-06-17 18:44:49
你必须像这样在app.component.ts中注册硬件返回按钮操作:
platform.registerBackButtonAction(() => {
if(this.nav.canGoBack()){
this.nav.pop();
}else{
if(isAlertShowing){
//dismiss alert
}else{
//show alert
}
}
});https://stackoverflow.com/questions/39203958
复制相似问题