Skip to content

Instantly share code, notes, and snippets.

@re4388
Created July 25, 2020 02:42
Show Gist options
  • Select an option

  • Save re4388/64686c7b8ac4f5c54b39756e60846878 to your computer and use it in GitHub Desktop.

Select an option

Save re4388/64686c7b8ac4f5c54b39756e60846878 to your computer and use it in GitHub Desktop.
前端處理和後端處理
 ngAfterViewInit() {
   this.httpClient.get<any>(`https://api.github.com/search/issues?q=repo:angular/material2&page=${this
    .currentPage.pageIndex + 1}`).subscribe(data => {
     this.totalCount = data.items.length;
     this.emailsDataSource.data = data.items;
       
     // no need below line anymore  
     // this.emailsDataSource.paginator = this.paginator;
  });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment