I did not try to get this exact example of work, but I achieved a similar effect in one of my applications, providing all the tabs with the same view name:
app.js
$stateProvider .state('signin', { url: "/sign-in", templateUrl: "sign-in.html", controller: 'SignInCtrl' }) .state('forgotpassword', { url: "/forgot-password", templateUrl: "forgot-password.html" }) .state('tabs', { url: "/tab", abstract: true, templateUrl: "tabs.html" }) .state('tabs.home', { url: "/home", views: { 'tab-view': { templateUrl: "home.html", controller: 'HomeTabCtrl' } } }) .state('tabs.facts', { url: "/facts", views: { 'tab-view': { templateUrl: "facts.html" } } }) .state('tabs.facts2', { url: "/facts2", views: { 'tab-view': { templateUrl: "facts2.html" } } }) .state('tabs.about', { url: "/about", views: { 'tab-view': { templateUrl: "about.html" } } })
tabs.html
<ion-tabs tabs-style="tabs-icon-top" tabs-type="tabs-positive" animation="slide-left-right"> <ion-tab title="Home" icon="ion-home" href="#/tab/home"> <ion-nav-view name="tab-view"></ion-nav-view> </ion-tab> <ion-tab title="About" icon="ion-ios7-information" href="#/tab/about"> <ion-nav-view name="tab-view"></ion-nav-view> </ion-tab> </ion-tabs>
Note the name "tab" for each state and again as the name attribute on the ion-nav-view on each tab.
source share