angularUtils icon indicating copy to clipboard operation
angularUtils copied to clipboard

How can I obtain the current index, and how can I set an existing page in specific?

Open YeisonVelez11 opened this issue 8 years ago • 1 comments

How can I obtain the current index, and how can I set an existing page in specific?

for example:

|1 | |2 | | 3| ....|9|

The current page is the 2.

How can get the pagination "2". and How can set the page "3" for example?

thanks

YeisonVelez11 avatar Dec 28 '17 15:12 YeisonVelez11

you'll need to adapt this to your use case but here is an example that I use to get the current index|page

<li dir-paginate="event in tpl.events | itemsPerPage:tpl.pagination.perPage" current-page="tpl.pagination.currentPage" class="event">

then in your controller this.pagination.currentPage would be the index|page. You can set page to 3 by setting this.pagination.currentPage to equal 3.

schester44 avatar Jan 11 '18 20:01 schester44