Skip to content
angulux
@anguless/angulux/paginator

paginator

1 declarations2 demos
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-paginator

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

InputTypeDefaultDescription
pageLinkSizenumbernot documentedNumber of page links to display.
styleClass
deprecated — since v20.0.0, use `class` instead.
string | undefinednot documentedStyle class of the component.
alwaysShowbooleannot documentedWhether to show it even there is only one page.
dropdownAppendTo
deprecated — since v20.0.0. Use `appendTo` instead.
HTMLElement | ElementRef | TemplateRef<any> | string | null | undefined | anynot documentedTarget 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).
templateLeftTemplateRef<PaginatorTemplateContext> | undefinednot documentedTemplate instance to inject into the left side of the paginator.
templateRightTemplateRef<PaginatorTemplateContext> | undefinednot documentedTemplate instance to inject into the right side of the paginator.
dropdownScrollHeightstringnot documentedDropdown height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value.
currentPageReportTemplatestringnot documentedTemplate of the current page report element. Available placeholders are {currentPage},{totalPages},{rows},{first},{last} and {totalRecords}
showCurrentPageReportboolean | undefinednot documentedWhether to display current page report.
showFirstLastIconbooleannot documentedWhen enabled, icons are displayed on paginator to go first and last page.
totalRecordsnumbernot documentedNumber of total records.
rowsnumbernot documentedData count to display per page.
rowsPerPageOptionsany[] | undefinednot documentedArray 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'}]
showJumpToPageDropdownboolean | undefinednot documentedWhether to display a dropdown to navigate to any page.
showJumpToPageInputboolean | undefinednot documentedWhether to display a input to navigate to any page.
jumpToPageItemTemplateTemplateRef<PaginatorDropdownItemTemplateContext> | undefinednot documentedTemplate instance to inject into the jump to page dropdown item inside in the paginator.
showPageLinksbooleannot documentedWhether to show page links.
localestring | undefinednot documentedLocale to be used in formatting.
dropdownItemTemplateTemplateRef<PaginatorDropdownItemTemplateContext> | undefinednot documentedTemplate instance to inject into the rows per page dropdown item inside in the paginator.
firstnumbernot documentedZero-relative number of the first row to be displayed.
appendToHTMLElement | 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).
OutputTypeDescription
onPageChangeEventEmitter<PaginatorState>Callback to invoke when page changes, the event object contains information about the new state.
Template slotDescription
<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
InputTypeDefaultDescription
dtObject | undefined undefined Defines scoped design tokens of the component.
unstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.
ptPT | undefined undefined Used to pass attributes to DOM elements inside the component. TRUSTED INPUT ONLY. Whatever you put here is applied to the DOM as given: keys become attributes, and a key that names a DOM property is assigned to that property directly, with no sanitizer in between. That is what makes the API useful, and it means a value reaching it from a user, a database or a CMS can execute script. Treat it like markup you wrote yourself, not like data you received.
ptOptionsPassThroughOptions | undefined undefined Used to configure passthrough(pt) options of the component.