Angular pagination

Why do i required.
I found ngx-pagination which had all the collections like items = array(512)
and shows the pagination based on 512 results.
But i needed to hit the APIs each time when page changes and fetch the only records of a singe page based on skip and limit.
So i created a pagination generated based on totalItems count only and it sends me the pageChange($event) when any new page is clicked.
its also handling 4 pages both side of selected page.