[英]Ionic Angular app going to login screen on click of back button
I am developing an ionic app with Angular and facing one issue related to android device back button.我正在使用 Angular 开发一个 ionic 应用程序,并面临一个与 android 设备后退按钮相关的问题。
when I am installing app from android studio and on using back button app minimize function (cordova-plugin-appminimize) is working fine and able to reload the application with no issues.当我从 android studio 安装应用程序并使用后退按钮应用程序最小化功能(cordova-plugin-appminimize)工作正常并且能够毫无问题地重新加载应用程序时。
but when I am installing by sharing apk and on click of back button app is getting minimized and after reloading app is navigating to login screen.但是当我通过共享 apk 进行安装时,单击后退按钮应用程序被最小化,并且在重新加载应用程序后导航到登录屏幕。
Please let me know if you have faced any similar issue and what was the resolution.请让我知道您是否遇到过类似的问题以及解决方案。
Thanks谢谢
Use a Routing guard(canActivate) to prevent this.使用路由保护(canActivate)来防止这种情况。 or You can also handle the back button event
或者您也可以处理后退按钮事件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.