Ion-nav-bar inside ion-view


#1

Hi everyone, I am creating an app and I am using ion-views on it, I am using ng-template, I was looking at the documentation that inside an ion-view I can create an ion-nav-bar to overwrite the “parent” one and put some button or behaviors that are specific of this ion-view, so I did that, I created a ion-nav bar inside an ion-view and put a button on the right side that sends me to another page, works fine, but when I click on the back button on the ion-nav-bar to go back to the last page, the button I putted on the right side is gone, simple disappear, what am I doing wrong? Here is the part of the code:

Index page

<!-- Title Bar -->
<ion-nav-bar class="nav-title-slide-ios7 bar-positive">
  <ion-nav-back-button class="button-clear button-icon ion-arrow-left-c"></ion-nav-back-button>
</ion-nav-bar>
<!-- Manage the views in Ionic -->
<ion-nav-view animation="slide-left-right-ios7"></ion-nav-view>

new view page

<script type="text/ng-template" id="setlist">
  <ion-view>
    <ion-nav-bar class="nav-title-slide-ios7 bar-positive">
      <ion-nav-back-button class="button-clear button-icon ion-arrow-left-c"></ion-nav-back-button>
      <h1 class="title">Setlists</h1>
      <ion-nav-buttons align="right">
        <a class="button button-clear button-icon ion-plus" href="#/setlist/add_form"></a>
      </ion-nav-buttons>
      <!-- <div class="buttons right-buttons">
        <a class="button button-clear button-icon ion-plus" href="#/setlist/add_form"></a>
      </div> -->
    </ion-nav-bar>
    <ion-content>
      <ion-list>
        <ion-item>
         Item 1
        </ion-item>
        <ion-item>
         Item 2
        </ion-item>
      </ion-list>
    </ion-content>
  </ion-view>
</script>

The solution I found was to put ion-nav-bar inside all my templates, is that correct?