# paginator

```ts
import { PaginatorModule } from '@anguless/angulux/paginator';
```

## Paginator

`agl-paginator` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

Paginator is a generic component to display content in paged format.

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `pageLinkSize` | `number` | _not documented_ | Number of page links to display. |
| `styleClass` | `string \| undefined` | _not documented_ | Style class of the component. **Deprecated:** since v20.0.0, use `class` instead. |
| `alwaysShow` | `boolean` | _not documented_ | Whether to show it even there is only one page. |
| `dropdownAppendTo` | `HTMLElement \| ElementRef \| TemplateRef<any> \| string \| null \| undefined \| any` | _not documented_ | Target element to attach the dropdown overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). **Deprecated:** since v20.0.0. Use `appendTo` instead. |
| `templateLeft` | `TemplateRef<PaginatorTemplateContext> \| undefined` | _not documented_ | Template instance to inject into the left side of the paginator. |
| `templateRight` | `TemplateRef<PaginatorTemplateContext> \| undefined` | _not documented_ | Template instance to inject into the right side of the paginator. |
| `dropdownScrollHeight` | `string` | _not documented_ | Dropdown height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value. |
| `currentPageReportTemplate` | `string` | _not documented_ | Template of the current page report element. Available placeholders are {currentPage},{totalPages},{rows},{first},{last} and {totalRecords} |
| `showCurrentPageReport` | `boolean \| undefined` | _not documented_ | Whether to display current page report. |
| `showFirstLastIcon` | `boolean` | _not documented_ | When enabled, icons are displayed on paginator to go first and last page. |
| `totalRecords` | `number` | _not documented_ | Number of total records. |
| `rows` | `number` | _not documented_ | Data count to display per page. |
| `rowsPerPageOptions` | `any[] \| undefined` | _not documented_ | Array of integer/object values to display inside rows per page dropdown. A object that have 'showAll' key can be added to it to show all data. Exp; [10,20,30,{showAll:'All'}] |
| `showJumpToPageDropdown` | `boolean \| undefined` | _not documented_ | Whether to display a dropdown to navigate to any page. |
| `showJumpToPageInput` | `boolean \| undefined` | _not documented_ | Whether to display a input to navigate to any page. |
| `jumpToPageItemTemplate` | `TemplateRef<PaginatorDropdownItemTemplateContext> \| undefined` | _not documented_ | Template instance to inject into the jump to page dropdown item inside in the paginator. |
| `showPageLinks` | `boolean` | _not documented_ | Whether to show page links. |
| `locale` | `string \| undefined` | _not documented_ | Locale to be used in formatting. |
| `dropdownItemTemplate` | `TemplateRef<PaginatorDropdownItemTemplateContext> \| undefined` | _not documented_ | Template instance to inject into the rows per page dropdown item inside in the paginator. |
| `first` | `number` | _not documented_ | Zero-relative number of the first row to be displayed. |
| `appendTo` | `HTMLElement \| ElementRef \| TemplateRef<any> \| 'self' \| 'body' \| null \| undefined \| any` | `'self'` | Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). |

| Output | Type | Description |
| --- | --- | --- |
| `onPageChange` | `EventEmitter<PaginatorState>` | Callback to invoke when page changes, the event object contains information about the new state. |

| Slot | Read as | Description |
| --- | --- | --- |
| `<ng-template #dropdownicon>` | `dropdownIconTemplate` | Template for the dropdown icon. |
| `<ng-template #firstpagelinkicon>` | `firstPageLinkIconTemplate` | Template for the first page link icon. |
| `<ng-template #previouspagelinkicon>` | `previousPageLinkIconTemplate` | Template for the previous page link icon. |
| `<ng-template #lastpagelinkicon>` | `lastPageLinkIconTemplate` | Template for the last page link icon. |
| `<ng-template #nextpagelinkicon>` | `nextPageLinkIconTemplate` | Template for the next page link icon. |
