@@ -7,7 +7,7 @@ import { DualListComponent } from './dual-list.component';
7
7
template : `
8
8
<div class="container-fluid">
9
9
<p></p>
10
- <dual-list [sort]="keepSorted" [source]="stations" [(destination)]="confirmed" height="265px"></dual-list>
10
+ <dual-list [sort]="keepSorted" [source]="stations" key="key" display="station" [(destination)]="confirmed" height="265px"></dual-list>
11
11
<div style="margin-top:32px;"><h4>Confirmed</h4><pre>{{confirmed|json}}</pre></div>
12
12
</div>
13
13
`
@@ -18,42 +18,42 @@ export class DemoAppComponent {
18
18
private keepSorted :boolean = true ;
19
19
20
20
private stations :Array < any > = [
21
- { _id : 1 , _name : 'Antonito' } ,
22
- { _id : 2 , _name : 'Big Horn' } ,
23
- { _id : 3 , _name : 'Sublette' } ,
24
- { _id : 4 , _name : 'Toltec' } ,
25
- { _id : 5 , _name : 'Osier' } ,
26
- { _id : 6 , _name : 'Chama' } ,
27
- { _id : 7 , _name : 'Monero' } ,
28
- { _id : 8 , _name : 'Lumberton' } ,
29
- { _id : 9 , _name : 'Duice' } ,
30
- { _id : 10 , _name : 'Navajo' } ,
31
- { _id : 11 , _name : 'Juanita' } ,
32
- { _id : 12 , _name : 'Pagosa Jct' } ,
33
- { _id : 13 , _name : 'Carracha' } ,
34
- { _id : 14 , _name : 'Arboles' } ,
35
- { _id : 15 , _name : 'Allison ' } ,
36
- { _id : 16 , _name : 'Tiffany' } ,
37
- { _id : 17 , _name : 'La Boca' } ,
38
- { _id : 18 , _name : 'Ignacio' } ,
39
- { _id : 19 , _name : 'Oxford' } ,
40
- { _id : 20 , _name : 'Florida' } ,
41
- { _id : 21 , _name : 'Bocea' } ,
42
- { _id : 22 , _name : 'Carbon Jct' } ,
43
- { _id : 23 , _name : 'Durango' } ,
44
- { _id : 24 , _name : 'Home Ranch' } ,
45
- { _id : 25 , _name : 'Trimble' } ,
46
- { _id : 26 , _name : 'Hermosa' } ,
47
- { _id : 27 , _name : 'Rockwood' } ,
48
- { _id : 28 , _name : 'Tacoma' } ,
49
- { _id : 29 , _name : 'Needleton' } ,
50
- { _id : 30 , _name : 'Elk Park' } ,
51
- { _id : 31 , _name : 'Silverton' } ,
52
- { _id : 32 , _name : 'Eureka' }
21
+ { key : 1 , station : 'Antonito' , state : 'CO ' } ,
22
+ { key : 2 , station : 'Big Horn' , state : 'NM ' } ,
23
+ { key : 3 , station : 'Sublette' , state : 'NM ' } ,
24
+ { key : 4 , station : 'Toltec' , state : 'NM ' } ,
25
+ { key : 5 , station : 'Osier' , state : 'CO ' } ,
26
+ { key : 6 , station : 'Chama' , state : 'NM' } ,
27
+ { key : 7 , station : 'Monero' , state : 'NM ' } ,
28
+ { key : 8 , station : 'Lumberton' , state : 'NM ' } ,
29
+ { key : 9 , station : 'Duice' , state : 'NM ' } ,
30
+ { key : 10 , station : 'Navajo' , state : 'NM ' } ,
31
+ { key : 11 , station : 'Juanita' , state : 'CO ' } ,
32
+ { key : 12 , station : 'Pagosa Jct' , state : 'CO ' } ,
33
+ { key : 13 , station : 'Carracha' , state : 'CO ' } ,
34
+ { key : 14 , station : 'Arboles' , state : 'CO ' } ,
35
+ { key : 15 , station : 'Solidad' , state : 'CO ' } ,
36
+ { key : 16 , station : 'Tiffany' , state : 'CO ' } ,
37
+ { key : 17 , station : 'La Boca' , state : 'CO ' } ,
38
+ { key : 18 , station : 'Ignacio' , state : 'CO ' } ,
39
+ { key : 19 , station : 'Oxford' , state : 'CO ' } ,
40
+ { key : 20 , station : 'Florida' , state : 'CO ' } ,
41
+ { key : 21 , station : 'Bocea' , state : 'CO ' } ,
42
+ { key : 22 , station : 'Carbon Jct' , state : 'CO ' } ,
43
+ { key : 23 , station : 'Durango' , state : 'CO ' } ,
44
+ { key : 24 , station : 'Home Ranch' , state : 'CO ' } ,
45
+ { key : 25 , station : 'Trimble Springs' , state : 'CO ' } ,
46
+ { key : 26 , station : 'Hermosa' , state : 'CO ' } ,
47
+ { key : 27 , station : 'Rockwood' , state : 'CO ' } ,
48
+ { key : 28 , station : 'Tacoma' , state : 'CO ' } ,
49
+ { key : 29 , station : 'Needleton' , state : 'CO ' } ,
50
+ { key : 30 , station : 'Elk Park' , state : 'CO ' } ,
51
+ { key : 31 , station : 'Silverton' , state : 'CO ' } ,
52
+ { key : 32 , station : 'Eureka' , state : 'CO ' }
53
53
] ;
54
54
55
55
private confirmed :Array < any > = [
56
- { _id : 32 , _name : 'Eureka' }
56
+ { key : 32 , station : 'Eureka' , state : 'CO ' }
57
57
] ;
58
58
59
59
}
0 commit comments