Is it possible to have content on a "shared" header bar - but in only one tab?


#1

Regarding this starter template: https://github.com/driftyco/ionic-starter-tabs

Is it possible to have an icon (or any content) on a “shared” header bar, but only in one tab? For example, in the Dashboard tab?

Whatever I place inside the ion-nav-bar directive…

<ion-nav-bar class="bar-stable nav-title-slide-ios7">
  <ion-nav-back-button class="button-icon icon ion-chevron-left">
    Back
  </ion-nav-back-button>
</ion-nav-bar>

…will show on all tabs. Example: http://embed.plnkr.co/b9XdU1/preview

BTW, the back button doesn’t show…even on iPad or iPhone.

Thanks!


#2

Something like this?

http://ionicframework.com/docs/api/directive/ionNavButtons/

As for the back button, what version of ios are you using? What version of ionic?


#3

Wow, so simple! Thanks a lot.

I’m using iOS 7.1.1 and Ionic v1.0.0-beta.6. I just tried with the beta8 version and still can’t see the back button.


#4

Can you try the nightly builds for the back button issue. If it still doesn’t show, can you open and issue for this and steps to reproduce it.

Are you getting this issue with the starter projects?


#5

With the starter project, the “< Back” only appears at the friend-detail.html view, but it seems it’s supposed to be that way. It actually makes sense (to me) when I think about the app, but not when I look at the code. I guess I misunderstood it, so I’ll take a deeper look at how Ionic structures the application, cause I might be missing some fundamental concepts there (like the header-bar issue). Thanks.