Created
September 10, 2014 17:16
-
-
Save JackTanRoo/8aa0cf5cb290b77cca25 to your computer and use it in GitHub Desktop.
Put testapp.js in the app folder, replace nite-out index.html with this index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html ng-app="test"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> | |
<title>Side Menus</title> | |
<link href="http://code.ionicframework.com/1.0.0-beta.11/css/ionic.css" rel="stylesheet"> | |
<script src="http://code.ionicframework.com/1.0.0-beta.11/js/ionic.bundle.js"></script> | |
</head> | |
<body ng-controller="MainCtrl"> | |
<ion-side-menus> | |
<ion-side-menu-content> | |
<button ng-click="toggleLeft()">CLICK TO TOGGLE</button> | |
</ion-side-menu-content> | |
<ion-side-menu side="left"> | |
<ion-header-bar class="bar-assertive"> | |
<h1 class="title">Left Menu</h1> | |
</ion-header-bar> | |
<ion-content> | |
<ul class="list"> | |
<h4>HI, {{test}}</h4> | |
</ul> | |
</ion-content> | |
</ion-side-menu> | |
</ion-side-menus> | |
<script src="app/testapp.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('test', ['ionic']) | |
.controller('MainCtrl', ['$scope', '$ionicSideMenuDelegate', | |
function($scope, $ionicSideMenuDelegate) { | |
$scope.test = "HAHAHA"; | |
$scope.toggleLeft = function() { | |
console.log("SUP"); | |
$ionicSideMenuDelegate.toggleLeft(); | |
}; | |
} | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment