This commit is contained in:
Max Lynch
2013-11-13 18:40:23 -06:00
parent 935c3dd2dd
commit 8e738713d5
10 changed files with 85 additions and 18 deletions

View File

@ -33,7 +33,7 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture'])
$scope.sideMenuContentTranslateX = 0;
$scope.sideMenuCtrl = this;
$scope.sideMenuController = this;
})
.directive('sideMenu', function() {

View File

@ -152,7 +152,7 @@ angular.module('ionic.ui.tabs', ['ngAnimate'])
};
},
template:
'<a href="#" ng-class="{active:active}" ng-click="selectTab()" class="tab-item">' +
'<a ng-class="{active:active}" ng-click="selectTab()" class="tab-item">' +
'<i ng-class="{{icon}}" ng-if="icon"></i>' +
'<i class="{{iconOn}}" ng-if="active"></i>' +
'<i class="{{iconOff}}" ng-if="!active"></i> {{title}}' +

View File

@ -13,6 +13,6 @@ describe('Ionic Angular Side Menu', function() {
it('Should init', function() {
var scope = el.scope();
expect(scope.sideMenuCtrl).not.toBe(undefined);
expect(scope.sideMenuController).not.toBe(undefined);
});
});

View File

@ -0,0 +1,60 @@
<html ng-app="navTest">
<head>
<meta charset="utf-8">
<title>Nav Bars</title>
<!-- Sets initial viewport load and disables zooming -->
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<link href="/vendor/font-awesome/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="../../../../dist/css/ionic.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-touch.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-animate.js"></script>
<script src="../../../../dist/js/ionic.js"></script>
<script src="../../../../dist/js/ionic-angular.js"></script>
</head>
<body>
<navs>
<nav-bar type="bar-primary" back-button-type="button-pure">
</nav-bar>
<div ng-controller="AppCtrl">
<content has-header="true">
</content>
</div>
</navs>
<script id="page.html" type="text/ng-template">
<div title="Home home" ng-controller="CatsCtrl" class="nav-content">
<h1></h1>
<button class="button button-success" ng-click="goNext()">Next</button>
<list><list-item ng-repeat="item in items" on-select="goNext()">Test</list-item></list>
</div>
</script>
<script>
angular.module('navTest', ['ionic', 'ngAnimate'])
.controller('AppCtrl', function($scope) {
$scope.navController.pushFromTemplate('page.html');
})
.controller('CatsCtrl', function($scope, $compile, $element) {
$scope.$on('navContent.shown', function() {
console.log('SHOWN');
});
$scope.$on('navContent.hidden', function() {
console.log('HIDDEN');
});
$scope.goNext = function() {
$scope.navController.pushFromTemplate('page.html');
};
});
</script>
</body>
</html>

View File

@ -63,7 +63,7 @@
});
}
$scope.openLeft = function() {
$scope.sideMenuCtrl.toggleLeft();
$scope.sideMenuController.toggleLeft();
};
});
</script>

View File

@ -51,11 +51,11 @@
<tabs
animation="fade-in-out"
tabs-type="tabs-icon-only"
tabs-style="tabs-primary"
tabs-style="tabs-positive"
controller-changed="onControllerChanged(oldController, oldIndex, newController, newIndex)">
<tab title="Home" icon-on="icon ion-ios7-filing" icon-off="icon ion-ios7-filing-outline" ng-controller="HomeCtrl">
<header class="bar bar-header bar-secondary">
<header class="bar bar-header bar-positive">
<button class="button button-clear button-primary" ng-click="newTask()">New</button>
<h1 class="title">Tasks</h1>
<button class="button button-clear button-primary" ng-click="isEditingItems = !isEditingItems">Edit</button>
@ -85,7 +85,7 @@
</tab>
<tab title="About" icon-on="icon ion-ios7-clock" icon-off="icon ion-ios7-clock-outline">
<header class="bar bar-header bar-secondary">
<header class="bar bar-header bar-positive">
<h1 class="title">Deadlines</h1>
</header>
<content has-header="true" has-tabs="true">
@ -94,7 +94,7 @@
</tab>
<tab title="Settings" icon-on="icon ion-ios7-gear" icon-off="icon ion-ios7-gear-outline">
<header class="bar bar-header bar-secondary">
<header class="bar bar-header bar-positive">
<h1 class="title">Settings</h1>
</header>
<content has-header="true" has-tabs="true">