-
Notifications
You must be signed in to change notification settings - Fork 857
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
Pagination: bind itemsPerPage
in custom template
#211
Comments
Plunker example: http://plnkr.co/edit/gSDBAx?p=preview |
Hi, Since the I would suggest creating a "wrapper" directive around the <div>
<div>
<select ng-model="pageSize" ng-options="o as o for o in pageSize"></select>
records per page
</div>
<dir-pagination-controls></dir-pagination-controls>
</div> And set up that directive's API so you can pass in a binding to your parent scope's itemsPerPage value. |
Hi @michaelbromley, thanks for your response. Sounds like a viable way to support this, since it's such a small component. Nevertheless I keep wondering if wouldn't it be cleaner to expose |
Please refer to #212 for extra info and an example from ui-grid's implementation |
Yeah I guess it would be trivial to expose this value to the template - where you suggest makes sense. Then there would just need to be a line in the watcher to update that value whenever the itemsPerPage changes externally. If you would like to implement this then let me know. Otherwise I'll add it to my mental "todo" list for next time I have some time to work on this. |
Hi! I would be glad to contribute, could you give me a clue about where to look at? Would this test be sufficient?
|
+1 I would also like to do exactly this thing, a drop-down menu to select page size without a wrapper. |
Yep, same thing I'm looking for. I'm trying to add a "pagination-limit" as its class is in Bootstrap pagination, next to the controls (right of it), something like this:
but it won't bind to the pagination.limit. pagination only contains current and last. |
Does anyone solve this problem? I also want to use a dropdown for items per page purpose in template-url's html to make it generic. If anyone solved this please share your code here. |
I would like to have access to the directive's
itemsPerPage
property in order bind it in my custom pagination template:The text was updated successfully, but these errors were encountered: