@anguless/angulux/paginator
Paginator
import
import { PaginatorModule } from '@anguless/angulux/paginator';Basic
Paginator reports the page it moved to; the caller owns first and rows.
Showing from 0, 10 per page
<div style="width: 100%"> <agl-paginator [first]="first()" [rows]="rows()" [totalRecords]="120" (onPageChange)="onPage($event)" /> <p style="text-align: center">Showing from {{ first() }}, {{ rows() }} per page</p></div>Rows per page
rowsPerPageOptions adds the control that changes the page size.
<div style="width: 100%"> <agl-paginator [first]="first()" [rows]="rows()" [totalRecords]="120" [rowsPerPageOptions]="[10, 20, 30]" (onPageChange)="onPage($event)" /></div>API
Generated from the committed corpus, which check:corpus holds to the built library.
Paginator
componentagl-paginatorPaginator is a generic component to display content in paged format.
| Input | Type | Default | Description |
|---|---|---|---|
| page | number | not documented | Number of page links to display. |
| style deprecated — since v20.0.0, use `class` instead. | string | undefined | not documented | Style class of the component. |
| always | boolean | not documented | Whether to show it even there is only one page. |
| dropdown deprecated — since v20.0.0. Use `appendTo` instead. | 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). |
| template | TemplateRef<PaginatorTemplateContext> | undefined | not documented | Template instance to inject into the left side of the paginator. |
| template | TemplateRef<PaginatorTemplateContext> | undefined | not documented | Template instance to inject into the right side of the paginator. |
| dropdown | string | not documented | Dropdown height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value. |
| current | string | not documented | Template of the current page report element. Available placeholders are {currentPage},{totalPages},{rows},{first},{last} and {totalRecords} |
| show | boolean | undefined | not documented | Whether to display current page report. |
| show | boolean | not documented | When enabled, icons are displayed on paginator to go first and last page. |
| total | number | not documented | Number of total records. |
| rows | number | not documented | Data count to display per page. |
| rows | 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'}] |
| show | boolean | undefined | not documented | Whether to display a dropdown to navigate to any page. |
| show | boolean | undefined | not documented | Whether to display a input to navigate to any page. |
| jump | TemplateRef<PaginatorDropdownItemTemplateContext> | undefined | not documented | Template instance to inject into the jump to page dropdown item inside in the paginator. |
| show | boolean | not documented | Whether to show page links. |
| locale | string | undefined | not documented | Locale to be used in formatting. |
| dropdown | 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. |
| append | 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 |
|---|---|---|
| on | EventEmitter<PaginatorState> | Callback to invoke when page changes, the event object contains information about the new state. |
| Template slot | Description |
|---|---|
| <ng-template #dropdownicon> | Template for the dropdown icon. |
| <ng-template #firstpagelinkicon> | Template for the first page link icon. |
| <ng-template #previouspagelinkicon> | Template for the previous page link icon. |
| <ng-template #lastpagelinkicon> | Template for the last page link icon. |
| <ng-template #nextpagelinkicon> | Template for the next page link icon. |
Inherited from BaseComponent
inherited| Input | Type | Default | Description |
|---|---|---|---|
| dt | Object | undefined | undefined | Defines scoped design tokens of the component. |
| unstyled | boolean | undefined | undefined | Indicates whether the component should be rendered without styles. |
| pt | PT | undefined | undefined | Used to pass attributes to DOM elements inside the component. Keys become attributes, and a key that names a DOM property is also assigned to that property. Values the browser would execute go through Angular's sanitizer first, as in a template binding: markup in `innerHTML`, `outerHTML` and `srcdoc`, and URLs in `href`, `src`, `action`, `formaction` and `xlink:href`. To write one of those unsanitized on purpose, pass a `DomSanitizer.bypassSecurityTrustHtml` or `bypassSecurityTrustUrl` value. An `on*` key must be a function, and any other value for it is ignored. Keys themselves are applied as given, so let data from users choose values, never keys. |
| pt | PassThroughOptions | undefined | undefined | Used to configure passthrough(pt) options of the component. |