带有分页的多个Mat-tabs

时间:2018-02-28 14:50:40

标签: angular angular-material2 angular5

需要在页面上创建2个mat-table元素,但分页不起作用...

<mat-table #table1 [dataSource]="dataSource" matSort id="jobs">
<mat-table #table2 [dataSource]="refDataSource" matSort id="errors">

@ViewChild('table1', {read: MatPaginator}) errPaginator: MatPaginator;
@ViewChild('table1', {read: MatSort}) errSort: MatSort;

@ViewChild('table2', {read: MatPaginator}) paginator: MatPaginator;
@ViewChild('table2', {read: MatSort}) sort: MatSort;

请帮助我,提前谢谢

0 个答案:

没有答案