ngx pagination and visble page numbers at time

627 views
Skip to first unread message

Dev C

unread,
Apr 14, 2019, 3:40:30 AM4/14/19
to ang...@googlegroups.com

I am using ngx- pagination in my angular 6 application, all well till it comes to number of page numbers visible at a time, I have set my HTML template code as below. but as per attached image it shows 1 .. 10 I dont want such kind of display, I want 1,2,3 at a time and when I click on next to the pager display should be 2,3,4 and so on. can any one please provide me help on this.

enter image description here

<pagination-controls  (pageChange)= "ChanggPage($event)" maxSize="3" >
</pagination-controls>

Sander Elias

unread,
Apr 16, 2019, 12:05:56 AM4/16/19
to Angular and AngularJS discussion
Hi DevC.

Straight from the ngx-pagination documentation:
If you require a more customised set of controls, you will need to use the PaginationControlsDirective and implement your own component.

My suggestion would be, start with that, and when you have trouble with the implementation of that, make a StackBlitz, and we will be able to help you. ngx-pagination already provides an example on StackBlitz, so that would be a good place to start.

Regards
Sander
 
Reply all
Reply to author
Forward
0 new messages