Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
YeisonVelez11 opened this issue Dec 28, 2017 · 1 comment

Comments

@YeisonVelez11
Copy link

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

@schester44
Copy link

schester44 commented Jan 11, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants