I have learned 3 days create mobile apps with ionic framework.
I originally made with html and css for each page, and in file index.html I want to add a side menu. then I add the code , and finally it worked ..
but, I get problems. .. does not appear under the header..
I do not know why the content does not appear, because before I add the , the content appears.
this my code index.html :
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
</head>
<body ng-app="starter">
<ion-side-menus>
<ion-side-menu-content>
<ion-header-bar class="bar-header bar-dark">
<button class="button button-clear button-positive">Edit</button>
<div class="h1 title">23 Desember 20014</div>
<button class="button button-icon icon ion-navicon" menu-toggle="right"> </button>
</ion-header-bar>
</ion-side-menu-content>
<ion-side-menu side="right">
<a menu-close href="#/home" class="item">Home</a>
<a menu-close href="#/home" class="item">Home</a>
<a menu-close href="#/home" class="item">Home</a>
</ion-side-menu>
</ion-side-menus>
<!-- NOT APPEAR -->
<ion-content>
<div class="row green">
<div class="col">Saldo</div>
<div class="col price">9,735,000</div>
</div>
<div class="row light-green">
<div class="col">Income</div>
<div class="col price">3,550,000</div>
</div>
<div class="row pink expense-now">
<div class="col"><strong>Expense</strong></div>
</div>
</ion-content>
<!-- NOT APPEAR -->
</body>
</html>
and this my code app.js :
// Ionic Starter App
angular.module('starter', ['ionic'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if(window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
});
})
function ContentController($scope, $ionicSideMenuDelegate) {
$scope.toggleLeft = function() {
$ionicSideMenuDelegate.toggleLeft();
};
}
please help me for this case, thank's in advance, regards
If you look at the documentation for side menu (http://ionicframework.com/docs/api/directive/ionSideMenus/) and the demos (http://codepen.io/ionic/pen/tcIGK), it looks like your content needs to be inside the ion-side-menus tag, not outside as you have it here.
Stackoverflow won't let me submit the CodePen url w/o code so I'm adding code just to get it to shut up.
<ion-side-menus>
<!-- Center content -->
<ion-side-menu-content ng-controller="ContentController">
</ion-side-menu-content>
<!-- Left menu -->
<ion-side-menu side="left">
</ion-side-menu>
<!-- Right menu -->
<ion-side-menu side="right">
</ion-side-menu>
</ion-side-menus>