The pagination directive for search
Example
Usage:
<invenio-search-pagination
show-go-to-first-last='true'
adjacent-size='4'
template='TEMPLATE_PATH'>
... Any children directives
</invenio-search-pagination>
Methods
(static) link(scope, element, attrs, vm)
Handle pagination
Parameters:
Name | Type | Description |
---|---|---|
scope |
service | The scope of this element. |
element |
service | Element that this direcive is assigned to. |
attrs |
service | Attribute of this element. |
vm |
invenioSearchController | Invenio search controller. |
(static) templateUrl(element, attrs)
Choose template for pagination
Parameters:
Name | Type | Description |
---|---|---|
element |
service | Element that this direcive is assigned to. |
attrs |
service | Attribute of this element. |
Example
Minimal template `template.html` usage
<ul class="pagination" ng-if="vm.invenioSearchResults.hits.total">
<li ng-class="paginationHelper.getPageClass(page.value)"
ng-repeat="page in paginatePages">
<a href="#" ng-click="paginationHelper.changePage(page.value)"
alt="{{ page.title }}">{{ page.value }}</a>
</li>
</ul>