I’m trying to get my ionic side menu bar working but for some reason it isn’t working.
Here’s my code:
I have created a codepen: http://codepen.io/beefman/pen/aOpKgL
HTML:
<ion-view view-title="Profiles" ng-controller="profileMenu">
<ion-nav-buttons side="right">
<button class="button" ng-click="doSomething()"> Enter ProfileID </button>
</ion-nav-buttons>
<ion-side-menus>
<ion-side-menu-content>
<ion-nav-bar class="bar-dark">
<ion-nav-back-button class="button-icon ion-arrow-left-c">
</ion-nav-back-button>
</ion-nav-bar>
<ion-nav-buttons side="left">
<button class="button button-icon button-clear ion-navicon" ng-click="toggleLeft()"></button>
</ion-nav-buttons>
<ion-nav-view name="appContent"></ion-nav-view>
</ion-side-menu-content>
<ion-side-menu side="left">
<ion-header-bar class="bar-assertive">
<h1 class="title">Profiles</h1>
</ion-header-bar>
<ion-content>
</ion-content>
</ion-side-menu>
</ion-side-menus>
<ion-content>
</ion-content>
</ion-view>
Javascript:
var app = angular.module('starter.controllers', ['ionic'])
app.controller('profileMenu', function($scope, $ionicSideMenuDelegate) {
$scope.toggleLeft = function() {
$ionicSideMenuDelegate.toggleLeft()
}
})