My problem is that, despite using ion-nav-title
my nav bar title isn’t updating when coming from a child state from ui-sref
.
But the nav bar updates fine when coming from a parent state.
I’ve followed this tutorial to improve the default Slide Menu example: http://robferguson.org/2015/01/07/ionics-sidemenu-template-and-nested-states/
Now my back button is a custom one
<ion-nav-buttons side="left">
<button class="button button-icon button-clear" ui-sref="app.events.detail.subevents({eventId : eventDetails._id})">
<i class="icon ion-arrow-left-c"></i>
</button>
</ion-nav-buttons>
<ion-nav-title>
<span ng-bind="subEventDetails.eventTitle"></span>: Participants
</ion-nav-title>
Here’s a plnkr to show my issue.
Scenario:
- slide menu; Events
- Title shows “List of Events”, the title is correct
- pick event 1 to see its sub events
- Title shows “Event 1: List of sub events”, the title is updated correctly
- pick sub event 1
- Title shows “SubEvent 1: List of Participants”, the title is updated correctly
- Go Back and the title will not change, it should revert back to “Event 1: List of sub events” but shows “SubEvent 1: List of Participants” instead. Note that the sub Events are displayed nevertheless…
Also, the problem doesn’t happen when going back from step 3, because I’m not using a dynamic ion-nav-title
but a static ion-view title
.
Hope someone has come accros this problem before, before I need the title to be dynamic.
Thanks for your help