Skip to content

Instantly share code, notes, and snippets.

@navanathjadhav
Created December 25, 2020 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save navanathjadhav/952b1dac4452c56227b70090753f59be to your computer and use it in GitHub Desktop.
Save navanathjadhav/952b1dac4452c56227b70090753f59be to your computer and use it in GitHub Desktop.
1. Skeleton methods for next and prev
currentPageNumber: number = 1;
// Fetch next page data
next() {
this.getData(this.currentPageNumber + 1)
}
// Fetch previous page data
prev() {
this.getData(this.currentPageNumber - 1)
}
// Fetch data from API
getData(pageNo: any) {
// Fetch API
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment