Hi guys! Is there an easy way to prevent page popping when pressing ion back button? I’d like to show a confirmation dialog to user before leaving page. I’m using Ionic 5.2.2 and trying this, but not working:
component.html
<ion-back-button *ngIf=“canGoBack” (click)=“this.backButtonClicked($event)”>
component.ts
public backButtonClicked(event) {
event.preventDefault();
event.stopPropagation();
event.stopImmediatePropagation();
}