ion-content 添加后未显示 ion-side-menu

ion-content not showing after add ion-side-menu

我已经学习了 3 天使用 ionic 框架创建移动应用程序。

我最初为每个页面制作了 html 和 css,在文件 index.html 中我想添加一个侧边菜单。然后我添加代码,终于成功了..

但是,我遇到了问题。 ..没有出现在header..

不知道为什么没有出现内容,因为在我添加之前,内容出现了

这是我的代码 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>

这是我的代码 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();
  };
}

请帮我解决这个问题, 提前致谢, 问候

如果您查看侧边菜单 (http://ionicframework.com/docs/api/directive/ionSideMenus/) and the demos (http://codepen.io/ionic/pen/tcIGK) 的文档,您的内容似乎需要 ion-side-menus 标签内,而不是外面就像你在这里一样。

Whosebug 不允许我提交 CodePen url w/o 代码,所以我添加代码只是为了让它闭嘴。

<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>