Hi All,
I have application with the following
Home Page
News
Events
Contact Us
Inbox
Settings
So I have the home page with the buttons (News,events,contact us …)
and in each page I have a side menu with the same menu
The problem I have is when I navigate from the home page to the other pages, I dont see the back button and when I click it, the application closes, I have this for the route
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('home', {
url: "/home",
cache: false,
controller: 'AppCtrl',
templateUrl: "templates/home.html",
})
.state('app', {
url: "/app",
abstract: true,
templateUrl: "templates/menu.html",
controller: 'AppCtrl'
})
.state('app.news', {
url: "/news",
cache: false,
views: {
'menuContent': {
templateUrl: "templates/news.html",
controller: 'NewsCtrl'
}
}
})
.state('app.events', {
url: "/events",
cache: false,
views: {
'menuContent': {
templateUrl: "templates/events.html",
controller: 'EventsCtrl'
}
}
})
I only have problem when navigating from the home to the other pages, I used the sidemenu starter template, and I added a home page
<ion-nav-bar class="bar-calm">
</ion-nav-bar>
<ion-header-bar class="bar-calm">
<h1 class="title"><img class="logo" src="img/logo.png"/></h1>
</ion-header-bar>
<ion-view view-title="{{'main_title'|translate}}" class="calm">
<ion-content>
<ion-list class="{{'language' | translate}}">
<ion-item nav-clear menu-close href="#/app/news">
<i class='f-big f-shadow ion-earth'></i> {{'news' | translate}}
<span ng-if="counts.news_count>0" class="{{'op_direction' | translate}} badge badge-stable">{{counts.news_count}}</span>
</ion-item>
<ion-item nav-clear menu-close href="#/app/events">
<i class='f-big f-shadow ion-edit'></i> {{'events' | translate}}
<span ng-if="counts.events_count>0" class="{{'op_direction' | translate}} badge badge-stable">{{counts.events_count}}</span>
</ion-item>
<ion-item nav-clear menu-close href="#/app/notifications">
<i class='f-big f-shadow ion-email'></i> {{'notifications' | translate}}
<span ng-if="counts.notifications_count>0" class="{{'op_direction' | translate}} badge badge-stable">{{counts.notifications_count}}</span>
</ion-item>
<ion-item nav-clear menu-close href="#/app/login">
<i class='f-big f-shadow ion-ios-telephone'></i> {{'contact' | translate}}
</ion-item>
<ion-item nav-clear menu-close href="#/app/settings">
<i class='f-big f-shadow ion-toggle'></i> {{'settings' | translate}}
</ion-item>
</ion-list>
</ion-content>
</ion-view>