File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 3
3
< button md-raised-button (click) ="connect() "> Connect New Data Source</ button >
4
4
< button md-raised-button (click) ="disconnect() " [disabled] ="!dataSource "> Disconnect Data Source</ button >
5
5
6
+ < div >
6
7
< button md-raised-button (click) ="_peopleDatabase.shuffle(changeReferences) "> Randomize Data</ button >
7
8
< md-checkbox [(ngModel)] ="changeReferences "> Change references</ md-checkbox >
9
+ </ div >
8
10
9
- < span > Track By</ span >
11
+ < div class ="demo-track-by-select ">
12
+ < div class ="demo-track-by-label "> Track By</ div >
10
13
< md-radio-group [(ngModel)] ="trackByStrategy ">
11
- < md-radio-button [value] ="'id' "> ID</ md-radio-button >
12
14
< md-radio-button [value] ="'reference' "> Reference</ md-radio-button >
15
+ < md-radio-button [value] ="'id' "> ID</ md-radio-button >
13
16
< md-radio-button [value] ="'index' "> Index</ md-radio-button >
14
17
</ md-radio-group >
15
18
</ div >
19
+ </ div >
16
20
17
21
< div class ="demo-highlighter ">
18
22
Highlight:
Original file line number Diff line number Diff line change 17
17
margin : 16px 0 ;
18
18
}
19
19
20
+ .demo-track-by-select {
21
+ display : flex ;
22
+ align-items : center ;
23
+
24
+ .demo-track-by-label {
25
+ margin-right : 8px ;
26
+ }
27
+ }
28
+
20
29
.demo-highlighter .mat-checkbox {
21
30
margin : 0 8px ;
22
31
}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export class PeopleDatabase {
24
24
25
25
initialize ( ) {
26
26
LATEST_ID = 0 ;
27
- this . data = [ ] ;
27
+ this . dataChange . next ( [ ] ) ;
28
28
for ( let i = 0 ; i < 100 ; i ++ ) { this . addPerson ( ) ; }
29
29
}
30
30
You can’t perform that action at this time.
0 commit comments