I am calling first(ABC) component inside the second tab of (xyz)component, The matPginator is present in ABC component, this.PMOpaginator value is undefined and is not working
@ViewChild(MatPaginator) PMOpaginator: MatPaginator;
@ViewChild(MatSort) PMOsort: MatSort;
this.subconEmployeeList = response;
this.dataSource = new MatTableDataSource(this.subconEmployeeList);
this.dataSource.sort = this.PMOsort;
this.dataSource.paginator = this.PMOpaginator;
this.excelDataSource = this.dataSource;
in the above code this.PMOsort and this.PMOpaginator are going undefined