Register BackButton action on Ionic 4?


#1

Since this function does not exist on ionic 4:

this.platform.registerBackButtonAction(() => {
  console.log("Some function");
});

How can I handle the backbutton click?

Thanks!