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
for Angular version below 7, use read argument for MatPaginator.
read
@ViewChild(MatPaginator, {read: true}) paginator: MatPaginator;
this worked for me.
Note that this works for Dynamically loaded table data.