I'm new to Ionic. I want to add custom items to the header bar.
It seems the header bar is generated by the framework inside the ion-nav-bar element.
<ion-nav-bar class="bar-positive">
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
I see, that the view-title from the tab template gets automatically put into the header bar.
<ion-view view-title="Home">
Here is the code I am working on: https://plnkr.co/edit/39XMp3FylDHofwJcFZmr?p=preview This is taken from the ionic documentation: http://ionicframework.com/docs/api/directive/ionTabs/
The header-bar documentation says, to add the header bar element before the ion-content element (see the home template), but it does not get displayed.
<ion-view view-title="Home">
<ion-header-bar align-title="left" class="bar-positive">
<h1 class="title">Custom Header</h1>
</ion-header-bar>
<ion-content class="padding">
<p>
<a class="button icon icon-right ion-chevron-right" href="#/tab/facts">Scientific Facts</a>
</p>
</ion-content>
</ion-view>
How can I add my own elements to the header bar, depending on currently displayed tab, or have a header bar in each template?