Ais-Pagination | Angular InstantSearch V4 (Deprecated)
Signature
<ais-pagination // Optional parameters [padding]="number" [totalPages]="number" [showFirst]="boolean" [showLast]="boolean" [showPrevious]="boolean" [showNext]="boolean" ></ais-pagination>
Import
Copy
1
2
3
4
5
6
7
8
import { NgAisPaginationModule } from 'angular-instantsearch';
@NgModule({
imports: [
NgAisPaginationModule,
],
})
export class AppModule {}
1. Follow additional steps in Optimize build size to ensure your code is correctly bundled.
2. This imports all the widgets, even the ones you don’t use. Read the Getting started guide for more information.
About this widget
The ais-pagination
widget displays a pagination system which lets users change the current page of search results.
The Algolia search engine limits paginating to 1,000 hits per page.
Examples
1
<ais-pagination></ais-pagination>
Props
padding
number
How many page links to display around the current page.
1
<ais-pagination padding="2"></ais-pagination>
totalPages
number
The maximum number of pages to display (and to allow navigating to).
1
<ais-pagination totalPages="5"></ais-pagination>
showFirst
boolean
Display the first page link.
1
<ais-pagination showFirst="false"></ais-pagination>
showLast
boolean
Display the last page link.
1
<ais-pagination showLast="false"></ais-pagination>
showPrevious
boolean
Display the previous page link.
1
<ais-pagination showPrevious="false"></ais-pagination>
showNext
boolean
Display the next page link.
1
<ais-pagination showNext="false"></ais-pagination>