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.