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


#1

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. … ion-content does not appear under the header…

I do not know why the content does not appear, because before I add the side-menu , 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


#2

Should not be your “ion-content” within your “ion-side-menu-content” after “ion-header-bar” ?


#3

Try this.

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

#4

thank’s all for reply.
oh yeah, this work. thank you for helping. :blush:


#5

thanks its working well…:smiley::smiley::smiley::smiley: