mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
Lots
This commit is contained in:
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
60
js/ext/angular/test/navTest.html
Normal file
60
js/ext/angular/test/navTest.html
Normal 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>
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
});
|
||||
}
|
||||
$scope.openLeft = function() {
|
||||
$scope.sideMenuCtrl.toggleLeft();
|
||||
$scope.sideMenuController.toggleLeft();
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -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">
|
||||
|
||||
Reference in New Issue
Block a user