InstantSearch / Angular / V4 / API reference

Ais-Pagination | Angular InstantSearch V4 (Deprecated)

Deprecated content
Angular InstantSearch is deprecated. Please use InstantSearch.js instead. For more information, see Migrating from Angular InstantSearch.

Signature

Signature
<ais-pagination
  // Optional parameters
  [padding]="number"
  [totalPages]="number"
  [showFirst]="boolean"
  [showLast]="boolean"
  [showPrevious]="boolean"
  [showNext]="boolean"
></ais-pagination>

Import

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

Optional
Type: number

How many page links to display around the current page.

1
<ais-pagination padding="2"></ais-pagination>

totalPages

Optional
Type: number

The maximum number of pages to display (and to allow navigating to).

1
<ais-pagination totalPages="5"></ais-pagination>

showFirst

Optional
Type: boolean

Display the first page link.

1
<ais-pagination showFirst="false"></ais-pagination>

showLast

Optional
Type: boolean

Display the last page link.

1
<ais-pagination showLast="false"></ais-pagination>

showPrevious

Optional
Type: boolean

Display the previous page link.

1
<ais-pagination showPrevious="false"></ais-pagination>

showNext

Optional
Type: boolean

Display the next page link.

1
<ais-pagination showNext="false"></ais-pagination>
Did you find this page helpful?