Skip to content

Pagination

<ax-pagination> renders first/prev, numbered pages with ellipsis, and next/last controls. Bind [(page)] and provide the total item count. Optionally apply axRouterPagination to sync the page with a URL query param.

import {
AxPaginationComponent,
AxRouterPaginationDirective,
} from '@axisui-ng/navigation';
<ax-pagination
[(page)]="page"
[total]="240"
[pageSize]="20"
[siblingCount]="1"
(pageChange)="load($event)"
/>
<!-- sync page to ?page= (or a custom param name) -->
<ax-pagination axRouterPagination [total]="240" />
<ax-pagination axRouterPagination="p" [total]="240" />
InputTypeDefaultNotes
pagemodel<number>1Current 1-based page (two-way).
totalnumber (required)Total item count.
pageSizenumber10Items per page (drives the page count).
siblingCountnumber1Page numbers shown either side of the current page.
OutputPayloadNotes
pageChangenumberEmitted when the user navigates to a different page.
InputTypeDefaultNotes
axRouterPaginationstring'page'Query param name. Apply the directive on <ax-pagination>; omit the value to use 'page'.

Host is role="navigation" with aria-label="Pagination". Page buttons use aria-label / aria-current="page"; first/prev/next/last have accessible names. Buttons at the ends disable when there is nowhere to go. Ellipsis tokens are decorative (aria-hidden).

Interactive examples live in Storybook under Navigation / Pagination. Run pnpm storybook to explore them.