I need help in locking Hardware back button in rootPage. Unfortunately when I override its behavior with platform.registerBackButtonAction()
the button is locked in all the app.
This what I tried in my homepage:
priority:number;
ngAfterViewInit() {
this.platform.registerBackButtonAction(() => {
if (!this.navCtrl.canGoBack()) this.priority = 1
else this.priority = -2000
}, this.priority);
}
ionViewDidLeave() {
this.priority = -2000
}