So I have to click the hardware back button second time to go back to homepage.
However, if I click the ion back button on the header on the second page, it will directly go back to the homepage with slide menu open
how to make the Android back button behave the same as ion back button (directly pop to the homepage instead of closing the menu on the previous page)
ion-menu code on the homepage
<ion-menu [content]="content" type="overlay" side="right">
<ion-content>
<header class="bar bar-header bar-stable">
<div *ngIf="person" class="profile" (tap)="goProfilePage()">
<img src="{{image_url }}" alt="">
<p>{{person.given_name}} {{person.family_name}}</p>
</div>
</header>
<ion-list>
<button menuClose ion-item (tap)="goProfilePage()" ><ion-icon name="md-contact"></ion-icon> Profile </button>
<button menuClose ion-item (tap)="logout()" *ngIf="person"><ion-icon name="md-log-in"></ion-icon> Log out </button>
<button menuClose ion-item (tap)="auth.login()" *ngIf="!person"><ion-icon name="md-log-in"></ion-icon> Log in </button>
</ion-list>
</ion-content>
</ion-menu>
<ion-nav #content [root]="rootPage" swipeBackEnabled="false"></ion-nav>
ionic info
Ionic:
ionic (Ionic CLI) : 4.10.3 (/Users/EL-CAPITAN-2016/.nvm/versions/node/v11.4.0/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.5.3
@ionic/app-scripts : 3.2.3
Cordova:
cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 7.1.4
Cordova Plugins : no whitelisted plugins (28 plugins total)
System:
Android SDK Tools : 26.1.1 (/Users/EL-CAPITAN-2016/Library/Android/sdk)
ios-deploy : 1.9.4
NodeJS : v11.4.0 (/Users/EL-CAPITAN-2016/.nvm/versions/node/v11.4.0/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001
Any help would be greatly appreciated thanks