Back Button Pure Javascript


Hi. I’m not using typescript + angular. I use javascript. I need simple action bar with back button. I get reference this page. Xml is here:

<Page loaded="loaded">
    <ActionBar title="App Icon Demo">
      <NavigationButton text="Go Back" android.systemIcon="ic_menu_back" tap="onNavBtnTap"/>

Back button (arrow) not working. I write this code every page:

function onNavBtnTap() {

exports.onNavBtnTap = onNavBtnTap;

I need to write every page ?


For Android: yes, I think. You have to explicitly show the button, because the OS expects the user to use the hardware button to go back.

On iOS: the OS usually will add the button automatically.