<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="lib/css/ionic.css" />
<script src="lib/js/ionic.bundle.js"></script>
<script>
angular.module("myapp",['ionic']).controller("democ",function($scope, $ionicSideMenuDelegate){
$scope.toggleLeftSideMenu = function() { $ionicSideMenuDelegate.toggleLeft();
};
$scope.items=[];
for(var i=0;i<20;i++){
$scope.items.push("item"+i);
}
});
</script>
</head>
<body ng-app="myapp" ng-controller="democ">
<ion-side-menus>
<!-- 中间内容 -->
<ion-side-menu-content>
<ion-header-bar class="bar-positive" align-title="center">
<button class="button button-icon ion-navicon-round" ng-click="toggleLeftSideMenu()"></button>
<h1 class="title">Slide me</h1>
</ion-header-bar>
<ion-content class="has-header">
<h1>Content</h1>
</ion-content>
</ion-side-menu-content>
<ion-side-menu side="left">
<ion-header-bar class="bar-positive">
<h1 class="title">left</h1>
<button class="button button-icon ion-ios-arrow-left" ng-click="toggleLeft()"></button>
</ion-header-bar>
<ion-content class="has-header">
<ul class="list" ng-repeat="item in items">
<li class="item">{{item}}</li>
</ul>
</ion-content>
</ion-side-menu>
</ion-side-menus>
</body>
</html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="lib/css/ionic.css" />
<script src="lib/js/ionic.bundle.js"></script>
<script>
angular.module("myapp",['ionic']).controller("democ",function($scope, $ionicSideMenuDelegate){
$scope.toggleLeftSideMenu = function() { $ionicSideMenuDelegate.toggleLeft();
};
$scope.items=[];
for(var i=0;i<20;i++){
$scope.items.push("item"+i);
}
});
</script>
</head>
<body ng-app="myapp" ng-controller="democ">
<ion-side-menus>
<!-- 中间内容 -->
<ion-side-menu-content>
<ion-header-bar class="bar-positive" align-title="center">
<button class="button button-icon ion-navicon-round" ng-click="toggleLeftSideMenu()"></button>
<h1 class="title">Slide me</h1>
</ion-header-bar>
<ion-content class="has-header">
<h1>Content</h1>
</ion-content>
</ion-side-menu-content>
<ion-side-menu side="left">
<ion-header-bar class="bar-positive">
<h1 class="title">left</h1>
<button class="button button-icon ion-ios-arrow-left" ng-click="toggleLeft()"></button>
</ion-header-bar>
<ion-content class="has-header">
<ul class="list" ng-repeat="item in items">
<li class="item">{{item}}</li>
</ul>
</ion-content>
</ion-side-menu>
</ion-side-menus>
</body>
</html>