Hi,
I am trying to create a multi route application where i have a common nav bar, which gets updated based on the view title.
Primarily i have two routes - /#/poll/list and /#/poll/show/1
/#/poll/list - Has a slide menu with one slide-menu-content( for the center content) and one slide-menu-left.
/#/poll/show/1 - Is a normal page
Catch - slide-menu-content(center) and the show page( /#/poll/show/1) have a common nav-bar( The have a common parent nav-view ).
Problem - When i load the url /#/poll/list, slide-menu-content’s title get’s replaced with the title of slide-menu-left( Perhaps because content of slide-menu-content loads from external template).
To work around this, i added a separate nav-bar to slide-menu-left, which fixes this issue but introduces another issue - Now when i toggle left, title doesn’t change, it takes the title of slide-menu-content( perhaps because their are different nav-bar’s and toggling doesn’t switch the nav-bar).
I am not sure how to fix this, any help would be appreciated. Adding the html for reference.
<!-- parent view's html -->
<nav-bar class="nav-title-slide-ios7 bar-positive">
<nav-back-button class="button-icon ion-arrow-left-c">
</nav-back-button>
</nav-bar>
<ion-nav-view></ion-nav-view>
<!-- end of parent -->
<!-- slide-menu's html -->
<ion-side-menus>
<ion-side-menu-content drag-content = "true">
<ion-nav-view name= 'poll-list' animation = 'slide-left-right'>
</ion-nav-view>
</ion-side-menu-content>
<ion-side-menu side="left">
<ion-nav-bar class="bar-assertive" delegate-handle = "category">
</ion-nav-bar>
<ion-view title = "Categories">
<ion-content>
<ion-list>
</ion-list>
</ion-content>
</ion-view>
</ion-side-menu>
</ion-side-menus>
<!-- show page -->
<ion-view title = 'Do you like peanut butter ?'>
<ion-content>
</ion-content>
</ion-view>
<!-- slide-menu-content ( centre ) html -->
<ion-view title = 'Latest Polls'>
<ion-nav-buttons side="left">
<button class = "button button-icon" ng-click = "toggleCategories()">
<i class = "icon ion-navicon"></i>
</button>
</ion-nav-buttons>
<ion-content>
<ion-list>
</ion-list>
</ion-content>
</ion-view>