首先可以在 app.module.ts 文件中配置。
@NgModule 中的 imports 屬性的 IonicModule.forRoot 第二個參數,如下:
IonicModule.forRoot(MyApp, {
backButtonText: '', // 配置返回按鈕的文字
backButtonIcon: 'arrow-dropleft-circle' // 配置返回按鈕的圖標
})
也可以在 ion-toolbar 中配置自定義圖標,並添加 navPop 屬性即可,如下:
<ion-header>
<ion-toolbar>
<button ion-button clear small navPop style="padding: 0;">
<img class="back-btn" src="assets/image/back.png" />
</button>
<ion-title class="my-title">我是標題</ion-title>
</ion-toolbar>
</ion-header>
<ion-navbar hideBackButton="true">
<ion-title>Sub Page</ion-title>
</ion-navbar>
或者通過控制 ViewController 來實現:this.viewCtrl.showBackButton(false);(轉載)原文章路徑:http://blog.csdn.net/zf_hacjox/article/details/70209648