-
Notifications
You must be signed in to change notification settings - Fork 0
/
list-demo.component.ts
38 lines (35 loc) · 1008 Bytes
/
list-demo.component.ts
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
import { Component } from '@angular/core';
import { mocked } from '../../../mocks/data';
import { songs } from '../../assets/songs';
@Component({
selector: 'ec-list-demo',
template: `
<h2>Simple List</h2>
<ec-list class="ec-list-card" [list]="mocked.lists.trees" #treeList [solo]="true" [paginationConfig]="paginationConfig"></ec-list>
<pre>
{{treeList.list.config | json}}
</pre>
<h2>Templated List</h2>
<ec-searchbar (selected)="select($event)" placeholder="Suche.." [list]="songlist" property="title"></ec-searchbar>
<ec-list #songlist [list]="songs" [solo]="true" #songList class="ec-list_dense ec-list_multiline"></ec-list>
<pre>
{{songList.list.config | json}}
</pre>
`,
})
export class ListDemoComponent {
public mocked = mocked;
public songs = mocked.lists.songs;
private songArray = songs.songs;
public paginationConfig = {
hideFirstLast: true
}
constructor() {
}
log(wort) {
console.log('log', wort);
}
select(item) {
console.log('select', item);
}
}