Ionic back-button event

Hi all ! Could anyone suggest please, is it possible handle event on back-button in the header ?

I also would like to know how to handle the back button. I would like to have a function like:

// some other code

I was able to figure it out!
In the .html I put:

		    <ion-buttons left>
		        <button ion-button icon-only (click)="onBackButton()" >
		            <ion-icon name="arrow-back"></ion-icon>
	    <ion-title>Roof Systems</ion-title>

In the .ts TypeScript, I put:

onBackButton() {
              let check: boolean = false;
               // functionality code
		if ( check ) {