mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
48 lines
1.7 KiB
HTML
48 lines
1.7 KiB
HTML
<html ng-app="contactsApp">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
|
|
|
|
<title>Collection-Repeat: Early Preview</title>
|
|
|
|
<link href="http://code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
|
|
<script src="http://code.ionicframework.com/nightly/js/ionic.bundle.js"></script>
|
|
<link href="style.css" rel="stylesheet">
|
|
<script src="script.js"></script>
|
|
<script src="contacts.js"></script>
|
|
</head>
|
|
|
|
<body ng-controller="MainCtrl">
|
|
<ion-header-bar class="bar-positive">
|
|
<h1 class="title">3000 Contacts</h1>
|
|
<div class="button" ng-click="scrollBottom()">
|
|
Scroll Bottom
|
|
</div>
|
|
</ion-header-bar>
|
|
<ion-header-bar class="bar-light bar-subheader">
|
|
<input type="search"
|
|
placeholder="Filter contacts..."
|
|
ng-model="search"
|
|
ng-change="scrollTop()">
|
|
<button ng-if="search.length"
|
|
class="button button-icon ion-android-close input-button"
|
|
ng-click="clearSearch()">
|
|
</button>
|
|
</ion-header-bar>
|
|
<ion-content>
|
|
<div class="list">
|
|
<a class="item my-item"
|
|
collection-repeat="item in getContacts()"
|
|
collection-item-height="getItemHeight(item)"
|
|
collection-item-width="100 + '%'"
|
|
ng-href="https://www.google.com/#q={{item.first_name + '+' + item.last_name}}"
|
|
ng-style="{'line-height': getItemHeight(item) + 'px'}"
|
|
ng-class="{'item-divider': item.isLetter}">
|
|
<img ng-if="!item.isLetter" ng-src="http://placekitten.com/60/{{55 + ($index % 10)}}">
|
|
{{item.letter || (item.first_name+' '+item.last_name)}}
|
|
</a>
|
|
</div>
|
|
</ion-content>
|
|
</body>
|
|
</html>
|