简体   繁体   English

单击后退按钮,Ionic Angular 应用程序将进入登录屏幕

[英]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或者您也可以处理后退按钮事件

see back button handling in ionic 请参阅离子中的后退按钮处理

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 应用程序在按下后退按钮时关闭而不是返回 - Ionic 5 - App closes on back button press instead of going back - Ionic 5 后退按钮返回登录页面,而不是角度4中的主页 - back button going back to login page instead of home page in angular 4 单击 ionic 5 中的硬件后退按钮退出应用程序的逻辑中的编译错误 - Compilation error in the logic of exiting an App on click of hardware back button in ionic 5 登录后单击硬件后退按钮导航到登录页面如何在离子4中防止它 - after login when click hardware back button navigated to login page how to prevent it in ionic 4 从ionic应用程序登录到仪表板时,菜单按钮显示为后退按钮 - when login from ionic app to dashboard the menu button showing as a back button 使用 Ionic (angular)。无法访问在显示屏/屏幕中有按钮的移动设备的硬件后退按钮 - Using Ionic (angular).Unable to access Hardware back button of mobile devices which have buttons inside the display/screen 离子应用程序文本不在聊天应用程序的视屏范围内 - Ionic app text is going out of view screen with chat app 使用Ionic2 / angular2的设备(Android)后退按钮单击检测 - Device(Android) back button click detection using Ionic2/angular2 IONIC - ANGULAR 为什么单击返回按钮时我有相同的多个请求? - IONIC - ANGULAR Why when click back button I have same multiple request? 单击ionic中的按钮时如何导航到新屏幕 - how to navigate to new screen on click of a button in ionic
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM