Sajith
Sajith

Reputation: 311

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

Upvotes: 4

Views: 2709

Answers (2)

Kirubel
Kirubel

Reputation: 1627

For latest Ionic versions try using

<ion-navbar hideBackButton >

This should work.

Upvotes: 1

jpoveda
jpoveda

Reputation: 2177

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/

Upvotes: 4

Related Questions