When you have a large amount of data, it is often beneficial to present it in paged format so that you don't have to load all of it at once. In this recipe, we will create an app with several pages of data that will require server-side pagination.
For this recipe, we will use a library called
Chance to generate a large set of random data. Chance is composed of various functions that allow us to get all sorts of random data to test with. So, it is ideal to mock up data before you have any. It can be installed by running
npm install chance in your command line.
To do server-side pagination using Socket.IO, follow these steps:
cordova create app ...