@@ -176,54 +176,17 @@ <h3>MatTable with First/Last Buttons Example</h3>
176
176
177
177
< div class ="demo-table-container demo-mat-table-example mat-elevation-z4 ">
178
178
179
- < table-header-demo (shiftColumns) ="displayedColumns.push(displayedColumns.shift()) "
180
- (toggleColorColumn) ="toggleColorColumn() ">
179
+ < table-header-demo >
181
180
</ table-header-demo >
182
181
183
- < mat-table [dataSource] ="dataSource " [trackBy] ="userTrackBy ">
184
-
185
- <!-- Column Definition: ID -->
186
- < ng-container cdkColumnDef ="userId ">
187
- < mat-header-cell *matHeaderCellDef > ID </ mat-header-cell >
188
- < mat-cell *matCellDef ="let row "> {{row.id}} </ mat-cell >
189
- </ ng-container >
190
-
191
- <!-- Column Definition: Progress -->
192
- < ng-container matColumnDef ="progress ">
193
- < mat-header-cell *matHeaderCellDef > Progress </ mat-header-cell >
194
- < mat-cell *matCellDef ="let row ">
195
- < div class ="demo-progress-stat "> {{row.progress}}%</ div >
196
- < div class ="demo-progress-indicator-container ">
197
- < div class ="demo-progress-indicator "
198
- [style.background] ="row.progress > 50 ? 'green' : 'red' "
199
- [style.opacity] ="getOpacity(row.progress) "
200
- [style.width.%] ="row.progress "> </ div >
201
- </ div >
202
- </ mat-cell >
203
- </ ng-container >
204
-
205
- <!-- Column Definition: Name -->
206
- < ng-container matColumnDef ="userName ">
207
- < mat-header-cell *matHeaderCellDef > Name </ mat-header-cell >
208
- < mat-cell *matCellDef ="let row "> {{row.name}} </ mat-cell >
209
- </ ng-container >
210
-
211
- <!-- Column Definition: Color -->
212
- < ng-container matColumnDef ="color ">
213
- < mat-header-cell *matHeaderCellDef > Color</ mat-header-cell >
214
- < mat-cell *matCellDef ="let row " [style.color] ="row.color "> {{row.color}} </ mat-cell >
215
- </ ng-container >
216
-
217
- < mat-header-row *matHeaderRowDef ="displayedColumns "> </ mat-header-row >
218
- < mat-row *matRowDef ="let row; columns: displayedColumns "> </ mat-row >
219
-
220
- </ mat-table >
182
+ < h4 class ="paginator-output "> {{paginatorOutput | json}}</ h4 >
221
183
222
184
< mat-paginator #paginator
223
185
[length] ="_peopleDatabase.data.length "
224
186
[pageSize] ="10 "
225
187
[pageSizeOptions] ="[5, 10, 25, 100] "
226
- [showFirstLastButtons] ="true ">
188
+ [showFirstLastButtons] ="true "
189
+ (page) ="handlePaginator($event) ">
227
190
</ mat-paginator >
228
191
</ div >
229
192
0 commit comments