I am currently doing an mobile app. I am struggling with putting these two side-menu and tab together. I can do either tab or menu but not both. I have created a demo in Codepen. As you can see in my code, I have the apps.tabs.home controller. I am not sure how to fix this problem. http://codepen.io/Hin/pen/Ejeewb
Here is my code that I have been working with:
tabs.html
<script id="templates/tabs.html" type="text/ng-template">
<ion-tabs class="tabs-icon-top tabs-positive">
<ion-tab title="Home" icon="ion-home" href="#/tab/home">
<ion-nav-view name="home-tab"></ion-nav-view>
</ion-tab>
<ion-tab title="About" icon="ion-ios-information" href="#/tab/about">
<ion-nav-view name="about-tab"></ion-nav-view>
</ion-tab>
<ion-tab title="Contact" icon="ion-ios-world" ui-sref="tabs.contact">
<ion-nav-view name="contact-tab"></ion-nav-view>
</ion-tab>
</ion-tabs>
</script>
menu.html
<script id="templates/menu.html" type=text/ng-template>
<ion-side-menus>
<ion-side-menu side="left">
<header class="bar bar-header bar-assertive">
<h1 class="title">Menu</h1>
</header>
<ion-content class="has-header">
<ion-list>
<ion-item nav-clear menu-close href="#/home">
Home
</ion-item>
<ion-item nav-clear menu-close href="#/about">
Add Expenses
</ion-item>
<ion-item nav-clear menu-close href="#/contact">
Expenses
</ion-item>
<ion-item nav-clear menu-close href="#/claim">
Claim
</ion-item>
</ion-list>
</ion-content>
</ion-side-menu>
</ion-side-menus>
</script>
Here is the controller js
angular.module('ionicApp', ['ionic'])
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('tabs', {
url: "/tab",
abstract: true,
templateUrl: "templates/tabs.html"
})
.state('app', {
url: "/app",
abstract: true,
templateUrl: "templates/menu.html"
})
.state('app.tabs.home',{
url:'/app/home',
views: {
'menuContent': {
templateUrl: "templates/home.html",
//controller: 'HomeTabCtrl'
}
}
})
.state('tabs.home', {
url: "/home",
views: {
'home-tab': {
templateUrl: "templates/home.html",
controller: 'HomeTabCtrl'
}
}
})
.state('tabs.about', {
url: "/about",
views: {
'about-tab': {
templateUrl: "templates/about.html"
}
}
})
.state('tabs.contact', {
url: "/contact",
views: {
'contact-tab': {
templateUrl: "templates/contact.html"
}
}
});
$urlRouterProvider.otherwise("/tab/home");
})