Please find the below code for the Android hardware back button action in ionic3. As Ionic4 uses angular routing for navigation how the pop event w
Customizing Android Back Button in Ionic 4 ... Each page wise back.
Step 1: import { Platform, NavController } from '@ionic/angular';
Step 2: constructor(public navCtrl: NavController){}
Step 3:
private async onBack() {
this.navCtrl.navigateBack('/project-details');
}
Step 4:
this.platform.backButton.subscribe(()=>{
this.onBack();
});