backButtonClick click event ionic 4

Hi all ! Could anyone suggest please, if exist way to handle ion-back-button click like in was it Ionic 3 ?

  this.navBar.backButtonClick = (e: UIEvent) => {


Why not use…

<ion-back-button (click)="backButtonClick($event)"></ion-back-button>
1 Like

You can use Angular Routing concept for Ionic 4.
1.Import below file,
import { Location } from ‘@angular/common’;

2.Declare in constructor as,
private location: Location

3.Declare below method.

goBack() {

Call the method in Html file
<button class=“nav_btn back_btn floatLeft” (click)=“goBack()”>

1 Like