mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Also, do manual transclusion on items that would be 'deep' directives - to fix a problem with transcluding & requiring parent elements. Closes #619
90 lines
2.5 KiB
HTML
90 lines
2.5 KiB
HTML
|
|
<html ng-app="ionic">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
|
|
|
|
<title>Sample UL</title>
|
|
|
|
<link href="../../../../dist/css/ionic.css" rel="stylesheet">
|
|
<script src="../../../../dist/js/ionic.bundle.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<ion-header-bar class="bar-positive" ng-class="{'bar-subheader': $root.isSub}">
|
|
<h1 class="title">Header!</h1>
|
|
</ion-header-bar>
|
|
|
|
<ion-content scroll="true" ng-controller="ContentCtrl" padding="false">
|
|
|
|
<pre>
|
|
$hasHeader: {{!!$hasHeader}}
|
|
$hasSubheader: {{!!$hasSubheader}}
|
|
</pre>
|
|
|
|
<ion-refresher on-refresh="onRefresh()" pulling-text="pull!" refreshing-text="refreshing!"></ion-refresher>
|
|
|
|
<ion-checkbox ng-model="$root.isSub">isSub</ion-checkbox>
|
|
|
|
<ul class="list">
|
|
<li class="item">This ion-list should *exactly* fit</li>
|
|
<li class="item">between header and footer (no gap),</li>
|
|
<li class="item">even with pull-to-refresh.</li>
|
|
<li class="item">4</li>
|
|
<li class="item">5</li>
|
|
<li class="item">6</li>
|
|
<li class="item">7</li>
|
|
<li class="item">8</li>
|
|
<li class="item">9</li>
|
|
<li class="item">10</li>
|
|
<li class="item">11</li>
|
|
<li class="item">12</li>
|
|
<li class="item">13</li>
|
|
<li class="item">14</li>
|
|
<li class="item">15</li>
|
|
<li class="item">16</li>
|
|
<li class="item">17</li>
|
|
<li class="item">18</li>
|
|
<li class="item">19</li>
|
|
<li class="item">20</li>
|
|
<li class="item">21</li>
|
|
<li class="item">22</li>
|
|
<li class="item">23</li>
|
|
<li class="item">24</li>
|
|
<li class="item">25</li>
|
|
<li class="item">26</li>
|
|
<li ng-repeat="i in more">more {{$index}}</li>
|
|
</ul>
|
|
|
|
<ion-infinite-scroll on-infinite="addMore()"></ion-infinite-scroll>
|
|
|
|
</ion-content>
|
|
|
|
<ion-footer-bar class="bar-assertive">
|
|
<h1 class="title">Footer!</h1>
|
|
</ion-footer-bar>
|
|
|
|
<script>
|
|
function ContentCtrl($scope, $timeout) {
|
|
$scope.onRefresh = function() {
|
|
$timeout(function() {
|
|
$scope.$broadcast('scroll.refreshComplete');
|
|
}, 1000);
|
|
};
|
|
$scope.more = [];
|
|
$scope.addMore = function() {
|
|
$timeout(function() {
|
|
var l = $scope.more.length;
|
|
for (var i=l; i<l+15; i++) {
|
|
$scope.more.push(i);
|
|
}
|
|
$scope.$broadcast('scroll.infiniteScrollComplete');
|
|
}, 1500);
|
|
};
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|