Events

The Pager emits pageChange and pageSizeChange events.

Handling the Events

To process the data when the Pager current page is changed, handle the pageChange event that exposes the skip and take values, necessary for obtaining the desired items.

The pageSizeChange event is triggered when selecting a new value from the PageSizes dropdown. If not prevented, it also triggers the pageChange event with the new page size, and skip 0.

Example
View Source
Edit In Stackblitz  
Change Theme:

Preventing the PageSizeChange Event

In some scenarios it may prove useful to prevent the Pager pageSizeChange event, and perform some custom logic.

The following example demonstrates how to open a confirmation dialog when the page size is greater than some arbitrary value, set by the developer, as displaying so many items could cause performance issues.

Example
View Source
Edit In Stackblitz  
Change Theme:

In this article

Not finding the help you need?