title: Multiple material pagination in one component doesn't work in Angular
body: <p>I try to create a component which includes two dataTables each of it with another dataSource. My Tables aren't visible right after the component is loaded because of my <code>*ngIf</code> so that i couldn't use <code>ngAfterViewInit()</code> instead i'm using a solution a user <a href="https://github.com/angular/material2/issues/10205" rel="noreferrer">pointed out on Github</a>:</p>
  
  <pre><code>  private paginator: MatPaginator;
    private reportingPaginator: MatPaginator;
    private sort: MatSort;
    private reportingSort: MatSort;
  
    @ViewChild(MatSort) set matSort(ms: MatSort) {
      this.sort = ms;
      this.reportingSort = ms;
      this.setDataSourceAttributes();
    }
  
    @ViewChild(MatPaginator) set matPaginator(mp: MatPaginator) {
      this.paginator = mp;
      this.reportingPaginator = mp;
      this.setDataSourceAttributes();
    }
  
    setDataSourceAttributes() {
  
        this.dataSource.paginator = this.paginator;
        this.dataSource.sort = this.sort;
  
        this.reportingDataSource.paginator = this.reportingPaginator;
        this.reportingDataSource.sort = this.reportingSort;
  
  }
  </code></pre>
  
  <p>But i still can't get it to work. My Pagination doesn't work, when both paginators are included into the <code>@ViewChild(MatPaginator)</code>. <strong>If i only include one of the paginators</strong></p>
  
  <pre><code>@ViewChild(MatPaginator) set matPaginator(mp: MatPaginator) {
      this.reportingPaginator = mp;
      this.setDataSourceAttributes();
  }
  </code></pre>
  
  <p><strong>or</strong></p>
  
  <pre><code>@ViewChild(MatPaginator) set matPaginator(mp: MatPaginator) {
      this.paginator = mp;
      this.setDataSourceAttributes();
  }
  </code></pre>
  
  <p><strong>the one i included works fine!</strong> So what do i need to do to get both paginators work?</p>