Skip to content

Instantly share code, notes, and snippets.

@gabhi
Last active August 29, 2015 13:57
Show Gist options
  • Save gabhi/9735248 to your computer and use it in GitHub Desktop.
Save gabhi/9735248 to your computer and use it in GitHub Desktop.
ionic side menu
<ion-side-menus>
<!-- Center content -->
<ion-pane ion-side-menu-content>
<header class="bar bar-header bar-positive">
<button class="button button-icon" ng-click="toggleMenu()">
Left
</button>
<h1 class="title">Center</h1>
<button class="button button-clear" ng-click="toggleRight()">
Right
</button>
</header>
<ion-content has-header="true" scroll="true">
center content
</content>
</ion-pane>
<!-- Left menu -->
<ion-side-menu side="left">
<header class="bar bar-header bar-positive">
Left content header
</header>
<ion-content has-header="true" scroll="true">
left content
</ion-content>
</ion-side-menu>
<ion-side-menu side="right">
<header class="bar bar-header bar-positive">
right content header
</header>
<ion-content has-header="true" scroll="true">
right content
</ion-content>
</ion-side-menu>
</ion-side-menus>
---- in the contoller add following functions
$scope.toggleRight = function() {
$scope.sideMenuController.toggleRight();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment