I’m working off of the “cordova-seed” project on Github. I have 3 tabs, and a list view on each tab. The list links into another “detail” view. All 3 lists point at the same detail view. The only difference between the 3 tab lists is some filtering that I do server side.
Anyways, when I click an item in the list to get to my “detail” view, the nav bar doesn’t maintain any “back” navigation and the title doesn’t work when setting from a scope property, though I can set the title to a hard-coded string:
Example: http://d.pr/i/yWtB
My index.html
has the following:
<nav-bar type="bar-assertive"
animation="nav-title-slide-ios7"
back-button-type="button-icon"
back-button-icon="ion-ios7-arrow-back"></nav-bar>
<nav-view name="main"></nav-view>
My state registration for this detail view looks like this:
.state('ticket-detail', {
url: '/ticket/:ticketId',
views: {
'main': {
templateUrl: 'templates/ticket-detail.html',
controller: 'TicketDetailCtrl'
}
},
requireLogin: true
});
I put it under the main
nav-view because I don’t want the tabs to keep showing while I’m on the detail screen.
My tabs live in “sub nav-views” I guess, just like the seed project. For example, in tabs.html
:
<nav-view name="yours-tab"></nav-view>
And those states are registered like so:
.state('tab.yours-index', {
url: '/yours',
views: {
'yours-tab': {
templateUrl: 'templates/yours-index.html',
controller: 'YoursIndexCtrl'
}
},
requireLogin: true
})
How can I maintain the back navigation button for my detail view?