Modifying bar-header in ion-nav-view

I’d just generated a sidebar ion template and I have ion-nav-view that sets title for pages with the view-title attribute.

<ion-view view-title="Playlists">
  <ion-content>
    <ion-list>
      <ion-item ng-repeat="playlist in playlists" href="#/app/playlists/{{playlist.id}}">
        {{playlist.title}}
      </ion-item>
    </ion-list>
  </ion-content>
</ion-view>

After searching around I found the ion-nav-title docs. I tried to take out the view-title attribute and have this in ion-content instead:

<ion-nav-title>
      <img src="logo.svg" alt="Show Something please!!!">
</ion-nav-title>

I also tried without the image and just the text in ion-nav-title but it wouldn’t work for me. How can I modify the bar-header such that I can add icons or images to it?
I’ve also followed this pen from this topic but it didn’t solve my problem

Hey, have you checked out this post? It could get you going in the right path once you modify it a little. This answer seems to solve the problem. Hope it helps :slight_smile:

Thanks @vokeh this pen solved my problem

1 Like