()
| 983 | @ViewChild(MatPaginator) paginator!: MatPaginator; |
| 984 | |
| 985 | constructor() { |
| 986 | this.underlyingDataSource.data = []; |
| 987 | |
| 988 | // Add three rows of data |
| 989 | this.underlyingDataSource.addData(); |
| 990 | this.underlyingDataSource.addData(); |
| 991 | this.underlyingDataSource.addData(); |
| 992 | |
| 993 | this.underlyingDataSource.connect().subscribe(data => { |
| 994 | this.dataSource.data = data; |
| 995 | }); |
| 996 | } |
| 997 | |
| 998 | ngOnInit() { |
| 999 | this.dataSource!.paginator = this.paginator; |