Ionic 2/3/4 Custom Back Button Icon

I would like to change the ion-icon used in my navbar’s back button, which appears when a page has been pushed onto the nav stack. Here is my code:

<ion-header>
   <ion-navbar>
      <button ion-button icon-only menuToggle>
        <ion-icon [name]="navbarIcon"></ion-icon>
      </button>
    <ion-title>Title</ion-title>
  </ion-navbar>
</ion-header>

The “name” directive affects the appearance of the menu toggle button, but it has no effect on the back button. Is there a way to modify my code so I can change the icon displayed in the back button?

I looked at this question, but it is for Ionic 1 and I also think there should be a better way.

You can use the Config component:

  ...

  this.config.set('backButtonIcon', 'fa-fal-arrow-left');
 
  ...