Skip to content

Commit d52ded7

Browse files
committed
demo(collectionRepeat): update demo
1 parent 618a5d7 commit d52ded7

File tree

4 files changed

+3080
-1122
lines changed

4 files changed

+3080
-1122
lines changed

demos/directive/collectionRepeat/contacts/contacts.css

Lines changed: 0 additions & 26 deletions
This file was deleted.

demos/directive/collectionRepeat/contacts/contacts.html

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,30 @@
33
component: collectionRepeat
44
---
55

6-
<div ng-controller="ContactsCtrl">
6+
<div ng-controller="MainCtrl" ng-app="contactsApp">
77
<ion-header-bar class="bar-positive">
8-
<h1 class="title">1000 Contacts</h1>
9-
<div class="button" ng-click="scrollBottom()">
10-
Bottom
11-
</div>
8+
<h1 class="title">3000 Contacts B</h1>
9+
<button class="button clear" ng-click="data.search = ''">Clear</button>
1210
</ion-header-bar>
13-
<ion-header-bar class="bar-light bar-subheader">
14-
<input type="search"
15-
placeholder="Filter contacts..."
16-
ng-model="search"
17-
ng-change="scrollTop()">
18-
<button ng-if="search.length"
19-
class="button button-icon ion-android-close input-button"
20-
ng-click="clearSearch()">
21-
</button>
11+
<ion-header-bar class="bar-subheader item-input-inset">
12+
<label class="item-input-wrapper">
13+
<input type="text" ng-model="data.search" placeholder="Filter Contacts..." type="search">
14+
</label>
2215
</ion-header-bar>
23-
<ion-content>
24-
<div class="list">
25-
<a class="item contact-item"
26-
collection-repeat="item in getContacts()"
27-
collection-item-height="getItemHeight(item)"
28-
collection-item-width="100 + '%'"
29-
ng-style="{'line-height': getItemHeight(item) + 'px'}"
30-
ng-class="{'item-divider': item.isLetter}">
31-
<i ng-if="!item.isLetter" class="icon" ng-class="['ion-ios7-person','ion-person','ion-android-contact','ion-android-social-user','ion-person-stalker'][$index % 5]"></i>
32-
{{item.letter || (item.first_name+' '+item.last_name)}}
33-
</a>
16+
<ion-content direction="y">
17+
<ion-list>
18+
<div collection-repeat="item in contacts | filter:data.search | orderBy:'last_name' | ionLetterDividers:'last_name'"
19+
divider-collection-repeat
20+
force-refresh-images>
21+
<ion-item>
22+
<h2>{{item.first_name+' '+item.last_name}}</h2>
23+
<p>{{$index}}</p>
24+
</ion-item>
25+
</ion-item>
3426
</div>
3527
</ion-content>
3628
</div>
29+
<script>
30+
</script>
31+
</body>
32+
</html>

0 commit comments

Comments
 (0)