-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathperson-list.component.ts
More file actions
43 lines (34 loc) · 1006 Bytes
/
person-list.component.ts
File metadata and controls
43 lines (34 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import * as angular from 'angular';
export let PersonListComponent = {
selector: 'personList',
template: `
<div class="col-md-12" >
<div class="row"
infinite-scroll="$ctrl.contacts.loadMore()"
infinite-scroll-immediate-check="false"
infinite-scroll-distance="1"
>
<cc-card ng-repeat="person in $ctrl.contacts.persons"
user="person" >
</cc-card>
</div >
<div ng-show="$ctrl.contacts.persons.length == 0 && !$ctrl.contacts.isLoading" >
<div class="alert alert-info" >
<p class="text-center" >No results found for search term '{{ $ctrl.search }}'</p >
</div >
</div >
<cc-spinner is-loading="$ctrl.contacts.isLoading"
message="Loading..." ></cc-spinner >
</div >
`,
bindings: {},
controller: class PersonListController {
public contacts = null;
constructor(ContactService) {
this.contacts = ContactService;
}
}
};
angular
.module('codecraft')
.component(PersonListComponent.selector, PersonListComponent);