<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="style.css">
<link href="http://code.ionicframework.com/1.0.0/css/ionic.min.css" rel="stylesheet">
<script src="http://www.google.com/jsapi"></script>
<script src="http://code.ionicframework.com/1.0.0/js/ionic.bundle.min.js"></script>
<script src="script.js"></script>
</head>
<body ng-app="myApp">
<ion-nav-view></ion-nav-view>
</body>
</html>
angular.module('myApp', ['ionic'])
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('app', {
url: "/app",
abstract: true,
templateUrl: "menu.html",
controller: 'AppCtrl'
})
.state('app.home', {
url: '/home',
views: {
'menuContent':{
templateUrl: 'home.html',
controller: 'HomeController'
}
}
})
.state('app.map', {
url: '/map',
views: {
'menuContent':{
templateUrl: 'map.html',
controller: 'MapController'
}
}
})
.state('app.test', {
url: '/test',
views: {
'menuContent':{
templateUrl: 'test.html',
controller: 'TestController'
}
}
});
$urlRouterProvider.otherwise('/app/home');
})
.controller('AppCtrl',function($scope, $rootScope, $http, $location) {
})
.controller('HomeController',function($scope, $location) {
$scope.title = "Home Page";
$scope.$on('$ionicView.loaded',function(){
console.log("Loading: home")
});
$scope.$on('$ionicView.enter',function(){
console.log("Entering: home")
});
})
.controller('MapController',function($scope, $location) {
$scope.title = "Map Page";
$scope.$on('$ionicView.loaded',function(){
console.log("Loading: map");
});
$scope.$on('$ionicView.enter',function(){
console.log("Entering: map")
});
})
.controller('TestController',function($scope, $location) {
$scope.title = "Test Page";
$scope.$on('$ionicView.loaded',function(){
console.log("Loading: test");
});
$scope.$on('$ionicView.enter',function(){
console.log("Entering: test")
});
});
/* Styles go here */
#map,#mapContainer .scroll{height: 100%;}
#map{width: 100%;}
<ion-view title="{{title}}" hide-back-button="true">
<ion-nav-buttons side="left">
<button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
</ion-nav-buttons>
<ion-content>
Hello, this is not the map page
</ion-content>
<div class="bar bar-footer bar-stable">
<div class="title">
Bam! A Footer!
</div>
</div>
</ion-view>
<ion-view title="{{title}}" hide-back-button="true">
<ion-nav-buttons side="left">
<button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
</ion-nav-buttons>
<ion-content id="mapContainer" class="has-header" has-bouncing="false">
<div id="map" data-tap-disabled="true"></div>
</ion-content>
</ion-view>
<ion-side-menus>
<ion-pane ion-side-menu-content edge-drag-threshold="true">
<ion-nav-bar class="bar-stable nav-title-slide-ios7">
<ion-nav-back-button class="button-clear"><i class="icon ion-chevron-left"></i> Back</ion-nav-back-button>
</ion-nav-bar>
<ion-nav-view name="menuContent" animation="slide-left-right"></ion-nav-view>
</ion-pane>
<ion-side-menu side="left">
<ion-content>
<ion-list>
<a class="item item-icon-right" href="#/app/home">
Home
<i class="icon ion-chevron-right"></i>
</a>
<a class="item item-icon-right" href="#/app/map">
Map
<i class="icon ion-chevron-right"></i>
</a>
<a class="item item-icon-right" href="#/app/test">
Test
<i class="icon ion-chevron-right"></i>
</a>
</ion-list>
</ion-content>
</ion-side-menu>
</ion-side-menus>
<ion-view title="{{title}}" hide-back-button="true">
<ion-nav-buttons side="left">
<button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
</ion-nav-buttons>
<ion-content class="has-header" has-bouncing="false">
Hiya
</ion-content>
</ion-view>