1.0.4 • Published 3 years ago
express-pagination-rbh v1.0.4
install dependency for pagination
npm i express-pagination-rbhIn our project we import the pagination dependency as follows.
const list = require('express-pagination-rbh');in our view we send the following parameters as follows:
where it receives as limitItems the total number of products to display.
where TotalProducts is the total of products.
where page is the page number.
const limitItems = 56;
const TotalProducts= 11328;
const page= 1;
const result = list.pagination(limitItems,TotalProducts,page);as output it returns the following data:

where if we change the page to 2 it returns the following data:

since with the data we can perform the pagination with bootstrap:
example made in express-handlebars.


image one example:

image two example:

to display the products from the database in the following path:
