I am trying to remove the back button from navigation bar of my pages. Is there any way to do so
Thanks
To remove the back button on this.navCtrl.push in your app.module.ts file
do this
import { IonicApp, IonicModule } from 'ionic-angular';
@NgModule({
declarations: [ MyApp ],
imports: [
IonicModule.forRoot(MyApp, {
backButtonText:'',
backButtonIcon:''
}, {}
)],
bootstrap: [IonicApp],
entryComponents: [ MyApp ],
providers: []
})
take a look at this link http://ionicframework.com/docs/v2/api/config/Config/
another way is you should use this.navCtrl.setRoot(pagename,{});
One way is to use ion-toolbar
<ion-toolbar>
<ion-title>Header</ion-title>
</ion-toolbar>
instead of navbar. Note: User will still be able to go back through the phone back button.
Better go for $ionicNavBarDelegate
This will helps to configure your backbutton.
http://ionicframework.com/docs/api/service/$ionicNavBarDelegate/