Ionic 5 - Remove ion-back-button text on ios global

Viewed 3585

How can I remove this via css or another method? Shadow CSS does not let me do this on an easy way.

I want to remove it for each page (global)

enter image description here

2 Answers

You can give a config object to Ionic in your app's main modules (assuming Angular):

import { IonicModule } from '@ionic/angular';

@NgModule({
  ...
  imports: [
    BrowserModule,
    IonicModule.forRoot({
      backButtonText: '' // Set an empty string to have no text next to the back icon
    }),
    AppRoutingModule
  ],
  ...
})

Full documentation : https://ionicframework.com/docs/angular/config#global-config

The way to remove "ion-back-button's text" from IOS via attribute is to add inside the ion-back-button tag text="none"; so you will have <ion-back-button text=""><ion-back-button>

Related