Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
how i control like popPage when i click back on my android phone
-
i
want
#navigator poppage
when i click android back button
but its app only exitedin android webview
-
@egirlasm, see https://community.onsen.io/topic/566/is-there-anyway-for-onsen-ui-react-to-handle-the-android-hardware-back-button-on-device/16
-
You can use this with Cordova
onDeviceReady: function() { document.addEventListener("backbutton", onBackKeyDown, false); } function onBackKeyDown() { //on click back }
-
you can add ng-device-back-button=“functionToCall()” attribute to the <ons-page> tag of the page you want to exit from and in the page cotroller you can define the functionToCall and use the nav.popPage
<ons-page ng-device-back-button="doBackWork()" .. >
in Controller
myNav.popPage()
You could also use
myNav.resetToPage("path/to/page.html")
-
Hi eGirlAsm,
Did you find the solution? Can you please tell me how to handle this .pop page on pressing device back button.