Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove back button in ionic header only in one page

I want to load a new view when a certain button is pressed. The view that loads should not show a back button to the previous page.

Back Button code:

<ion-nav-bar class="bar bar-header ionBarM " align-title="left">
        <ion-nav-title >
        <a ui-sref="app.feed"  ng-click="getEList()" > BACK<i class="pull-left ion-chevron-left"></i></a>  
        </ion-nav-title>           

what I actually want

like image 990
Sajith Avatar asked Nov 05 '25 17:11

Sajith


2 Answers

On your <ion-view> add the hide-back-button attribute: <ion-view hide-back-button="true">

The functionality is clearly explained in the official documentation for ion-view: http://ionicframework.com/docs/api/directive/ionView/

like image 169
jpoveda Avatar answered Nov 08 '25 07:11

jpoveda


For latest Ionic versions try using

<ion-navbar hideBackButton >

This should work.

like image 22
Kirubel Avatar answered Nov 08 '25 08:11

Kirubel