-
-
Save navanathjadhav/952b1dac4452c56227b70090753f59be to your computer and use it in GitHub Desktop.
1. Skeleton methods for next and prev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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