I have the following routes :
.state('home', {
url: '/home',
abstract: true,
templateUrl: 'app/home/home.html'
})
.state('home.search', {
url: '/search',
views: {
'home-search': {
templateUrl: 'app/search/search.html',
controller: 'SearchCtrl',
controllerAs: 'vm'
}
}
})
.state('home.options', {
url: '/options',
views: {
'home-search': {
templateUrl: 'app/search/options.html',
controller: 'OptionsCtrl',
controllerAs: 'vm'
}
}
})
.state('home.multi', {
url: '/multi',
abstract: true,
views: {
'home-search': {
templateUrl: 'app/search/options-tabs.html',
controller: 'MultiOptionsCtrl',
controllerAs: 'vm'
}
}
})
.state('home.multi.address', {
url: "/address",
views: {
'home-search-subtab': {
templateUrl: 'app/search/options-address.html'
}
}
})
with a default of
$urlRouterProvider.otherwise('/home/search');
and back buttons set up :
<ion-nav-back-button class="button-clear">
<i class="ion-arrow-left-c"></i> Back
</ion-nav-back-button>
<ion-nav-buttons side="left">
<button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
</ion-nav-buttons>
If I navigate from home.search to home.options the back button shows and left menu icon is hidden.
But if I navigate from home.search to home.multi.address the back button is hidden and left menu icon shows.
How come it doesn’t follow same logic ?
Edit : here is also the options-tab.html, I have a feeling the fact that I want to load a sub view is the problem here.
<ion-view class="home-search padding" padding="true">
<ion-header class="bar bar-subheader options-tabs">
<div class="subTabs">
<a class="tabsItem" ui-sref-active='active' nav-transition="none" ui-sref="home.multi.address">Address</a>
<a class="tabsItem" ui-sref-active='active' nav-transition="none" ui-sref="home.multi.business">Business</a>
</div>
</ion-header>
<ion-content class="has-subheader inner-content padding">
<ion-nav-view name="home-search-subtab"></ion-nav-view>
</ion-content>
</ion-view>