Override default back button behaviour



I would like to stop the default behaviour of the back button and implement my own. However i can only find how to override the android back button but no the visueel button in the header.

Any help is appreciated,


-> Ionic 4 - PWA Back Button not closing Modal