mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
92 lines
2.9 KiB
HTML
92 lines
2.9 KiB
HTML
<html ng-app="navTest">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Content</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>
|
|
<style>
|
|
.reveal-animation {
|
|
/*
|
|
-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;
|
|
*/
|
|
}
|
|
.reveal-animation.ng-enter {
|
|
-webkit-transition: .2s ease-in-out all;
|
|
-webkit-transform:translate3d(100%,0,0) ;
|
|
}
|
|
.reveal-animation.ng-enter-active {
|
|
-webkit-transform:translate3d(0,0,0) ;
|
|
}
|
|
.reveal-animation.ng-leave {
|
|
-webkit-transition: .2s ease-in-out all;
|
|
-webkit-transform:translate3d(0%,0,0);
|
|
}
|
|
.reveal-animation.ng-leave-active {
|
|
-webkit-transition: .2s ease-in-out all;
|
|
-webkit-transform:translate3d(-100%,0,0);
|
|
}
|
|
|
|
.scroll-refresher {
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
#refresh-content {
|
|
color: #999;
|
|
text-align: center;
|
|
font-size: 48px;
|
|
position: absolute;
|
|
bottom: 10px;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
<body ng-controller="AppCtrl">
|
|
|
|
<header class="bar bar-header bar-success">
|
|
<button class="button"><i class="icon ion-home"></i></button>
|
|
</header>
|
|
<content on-refresh="onRefresh()" on-refresh-opening="onRefreshOpening(amount)" has-header="true" class="reveal-animation">
|
|
<refresher>
|
|
<div id="refresh-content">
|
|
<i class="icon ion-ios7-reloading"></i>
|
|
</div>
|
|
</refresher>
|
|
<ul class="list">
|
|
<li class="list-item" ng-repeat="item in items">asdf{{$index}}</li>
|
|
</ul>
|
|
</content>
|
|
|
|
<script src="../../../../dist/js/ionic.js"></script>
|
|
<script src="../../../../dist/js/ionic-angular.js"></script>
|
|
<script>
|
|
angular.module('navTest', ['ionic.ui.content'])
|
|
|
|
.controller('AppCtrl', function($scope, $compile, $element) {
|
|
$scope.items = [];
|
|
for(var i = 0; i < 200; i++) {
|
|
$scope.items.push({
|
|
});
|
|
}
|
|
$scope.what = {};
|
|
$scope.onRefresh = function() {
|
|
console.log('On refresh');
|
|
}
|
|
$scope.onRefreshOpening = function(amt) {
|
|
console.log('On refresh opening', amt);
|
|
}
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|