Files
2013-11-17 14:26:41 -06:00

84 lines
2.4 KiB
HTML

<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">
<style>
.view {
position: fixed;
width: 100%;
height: 100%;
background-color: black;
}
.slide-in-slide-out {
/*
-webkit-transform: translate3d(0%, 0, 0);
transform: translate3d(0%, 0, 0);
-webkit-transition: -webkit-transform 1s ease-in-out;
transition: transform 1s ease-in-out;
*/
}
</style>
<script src="../../../../dist/js/ionic.js"></script>
<script src="../../../../dist/js/ionic-angular.js"></script>
</head>
<body>
<navigation first="page.html">
<nav-bar type="bar-primary" back-button-type="button-pure" align-title="left">
</nav-bar>
</navigation>
<script id="page.html" type="text/ng-template">
<div title="title" class="nav-page">
<div ng-controller="CatsCtrl">
<content has-header="true">
{{secretNumber}}
<list><item ng-repeat="item in items" nav-push="page.html">{{item.t}}</item></list>
<button nav-push="page.html" class="button button-assertive">Do it</button>
</content>
</div>
</div>
</script>
<script>
angular.module('navTest', ['ionic', 'ngAnimate'])
.controller('CatsCtrl', function($scope, $compile, $element) {
$scope.$on('navContent.shown', function() {
console.log('SHOWN');
});
$scope.$on('navContent.hidden', function() {
console.log('HIDDEN');
});
$scope.secretNumber = Math.floor(Math.random() * 100);
$scope.doit = function() { alert('waht'); };
var items = [
{t: 'This one'},
{t: 'Hmm, maybe this one'},
{t: 'Not that one, this one'},
{t: 'Um, this one?'},
{t: 'No, this one'}
];
items = items.sort(function() {
return .5 - Math.random();
});
$scope.items = items;
$scope.goNext = function() {
$scope.navController.pushFromTemplate('page.html');
};
});
</script>
</body>
</html>