mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
Random angular stuff and testing things
This commit is contained in:
@ -18,10 +18,42 @@
|
||||
</head>
|
||||
<body ng-app="ionic.menu">
|
||||
<ionic-left-right-menu>
|
||||
<section id="page" class="full-section menu-animated">
|
||||
|
||||
<header class="bar bar-header bar-dark">
|
||||
<div class="buttons">
|
||||
<a id="left-button" class="button button-dark" href="#">
|
||||
<i class="icon-reorder"></i>
|
||||
</a>
|
||||
</div>
|
||||
<h1 class="title">Chats</h1>
|
||||
<div class="buttons">
|
||||
<button id="right-button" class="button button-dark">
|
||||
<i class="icon-cog"></i>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
</section>
|
||||
|
||||
<div class="menu menu-left">
|
||||
<ul class="list">
|
||||
<li class="list-divider">Left Nav Things</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="menu menu-right">
|
||||
<ul class="list">
|
||||
<li class="list-divider">Right Nav Things</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--
|
||||
<ionic-menu side="left">
|
||||
</ionic-menu>
|
||||
<ionic-content>
|
||||
<h2>ASDF</h2>
|
||||
<ionic-content>
|
||||
<ionic-menu side="right">
|
||||
</ionic-menu>
|
||||
-->
|
||||
</ionic-left-right-menu>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
20
example/angular/menu.js
vendored
20
example/angular/menu.js
vendored
@ -3,25 +3,26 @@ angular.module('ionic.menu', [])
|
||||
.controller('LeftRightMenuController', ['$scope', '$element',
|
||||
function LeftRightMenuCtrl($scope, $element) {
|
||||
var ctrl = ion.controllers.LeftRightMenuViewController;
|
||||
|
||||
$scope.controllerInitData = {};
|
||||
|
||||
$scope.initIonicController = function() {
|
||||
$scope._ionicController = new ctrl($scope.controllerInitData);
|
||||
};
|
||||
}])
|
||||
|
||||
.directive('ionicLeftRightMenu', function() {
|
||||
return {
|
||||
restrict: 'EA',
|
||||
scope: true,
|
||||
transclude: true,
|
||||
controller: 'LeftRightMenuController',
|
||||
compile: function(elm, attrs, transclude) {
|
||||
return function(scope, element, attrs, menuCtrl) {
|
||||
console.log('Compile');
|
||||
};
|
||||
},
|
||||
link: function(scope) {
|
||||
console.log('link');
|
||||
link: function($scope, element, attributes) {
|
||||
$scope
|
||||
console.log('link', $scope);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
/*
|
||||
.directive('ionicMenu', function() {
|
||||
return {
|
||||
restrict: 'EA',
|
||||
@ -37,3 +38,4 @@ function LeftRightMenuCtrl($scope, $element) {
|
||||
}
|
||||
});
|
||||
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user