I need to implement server side pagination that is from api I am getting page number and page limit , I need to display series of button below the table and on click of that button api call will happen with respective button number.Suppose I click button number 2 then i need to display page number 2 data in table.for this I am using angular 5. I tried ngx-pagination but it didn't work for me.My json is like this :
[
{
"pagecount": [
{
"record_count": "69",
"pagenumber": "0",
"pagelimit": "5"
}
]
},
{
"completed": [
{
"queueid": "297885",
"cust_name": "MR DEWESH SHANKER",
"veh_number": "KA03 MW7878",
"payment_status": "Paid",
"queue_total": "7104",
"rating": "5.0"
},
{
"queueid": "298162",
"cust_name": "Pratham Motors Stockyard",
"veh_number": "CH14 0527",
"payment_status": "Paid",
"queue_total": "0",
"rating": "5.0"
},
{
"queueid": "298163",
"cust_name": "MS PALLAVI R DHOTRAGAVI\t",
"veh_number": "KA51 MK4228",
"payment_status": "Paid",
"queue_total": "2131",
"rating": "5.0"
},
{
"queueid": "298196",
"cust_name": "Pratham Motors Stockyard",
"veh_number": "CH15 9983",
"payment_status": "Paid",
"queue_total": "0",
"rating": "5.0"
}
]
}
]
How can i achieve this . Anyone Please ?
There are number of pagination component available for Angular, some of them which I used are -
You can use
as well depending on your requirements.
Have you tried angular data-table? The configuration is similar to the classic data-table.Looks promising.https://l-lin.github.io/angular-datatables/#/getting-started
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.