Angular MatPaginator not working

前端 未结 30 1583
情歌与酒
情歌与酒 2020-12-04 23:05

I have 2 components. Both have mat-table and paginators and pagination is working for one component and not working for the other component though the code is similar. Below

30条回答
  •  借酒劲吻你
    2020-12-04 23:43

    What worked for me was to do implement what Lonely suggested, regarding ChangeDetectorRef, and also, set an object with static: false, in the @ViewChild, like this:

      @ViewChild(MatPaginator, { static: false }) paginator: MatPaginator;
    

提交回复
热议问题