Reputation: 527
so I am currently doing a side menu for my Single Page Application, I got the side menu working, but I cannot display the main content. I am not sure what went wrong. I cannot display the word hello world in my page. Any one has an idea?
Here is my code
<ion-tab title="Draft" ng-controller="textController">
<ion-side-menus>
<ion-side-menu-content>
<ion-header-bar class="bar-positive">
<button class="button button-icon" ng-click="toggleLeft()" menu-toggle="left">
<i class="icon ion-navicon"></i>
</button>
<h1 class="title"> Details</h1>
</ion-header-bar>
</ion-side-menu-content>
<ion-side-menu side="left">
<header class="bar bar-header bar-assertive">
<h1 class="title">Menu</h1>
</header>
<ion-list>
<ion-item>
Home
</ion-item>
<ion-item>
About
</ion-item>
<ion-item>
Setting
</ion-item>
<ion-item>
Log out
</ion-item>
</ion-list>
</ion-side-menu>
</ion-side-menus>
<ion-content>
Hello World
</ion-content>
</ion-tab>
Here is my controller:
angular.module('app')
.controller('textController', function ($scope, $ionicSideMenuDelegate) {
$scope.toggleLeft = function () {
$ionicSideMenuDelegate.toggleLeft();
}
});
Upvotes: 1
Views: 593
Reputation: 38
Following the official Ionic documentation (http://ionicframework.com/docs/guide/starting.html) it seems that your "Hello World" content should be inside a <ion-side-menu-content>
tag, not a simple <ion-content>
. Please try that and let me know if that solves your problem.
Upvotes: 1