Pagination component for managing and displaying page navigation controls with various layouts and customizations.

app-pagination

true

[CommonModule, FontAwesomeModule]

This component renders pagination controls, allowing users to navigate through pages. The controls support horizontal and vertical layouts, customizable styles, and dynamic page content handling, with special support for breakout room navigation.

<app-pagination
[totalPages]="10"
[currentUserPage]="1"
[handlePageChange]="handlePageChange"
[position]="'middle'"
[location]="'bottom'"
[direction]="'horizontal'"
[backgroundColor]="'#ffffff'"
[paginationHeight]="40"
[showAspect]="true"
[parameters]="paginationParameters">
</app-pagination>

totalPages - Total number of pages available for navigation.

currentUserPage - Current active page number.

handlePageChange - Callback function to handle page changes.

position - Horizontal position of the pagination controls (default is 'middle').

location - Vertical position of the pagination controls (default is 'middle').

direction - Layout direction of the pagination controls (default is 'horizontal').

buttonsContainerStyle - Custom CSS styles for the buttons container.

activePageStyle - CSS styles for the active page button.

inactivePageStyle - CSS styles for inactive page buttons.

backgroundColor - Background color for the pagination controls.

paginationHeight - Height of the pagination controls in pixels.

showAspect - Flag to display or hide the pagination controls.

parameters - Additional configuration parameters for managing breakout rooms and related state.

ngOnInit - Lifecycle hook that initializes the component and sets up page data.

ngOnChanges - Handles input property changes to update page data when needed.

handleClick - Asynchronously handles page button clicks and manages breakout room navigation logic.

getPageStyle - Returns specific styles for a page button based on its active or inactive state.

isBreakoutRoom - Checks if a page represents a breakout room.

getDisplayItem - Returns the display label for a page, accounting for breakout room naming conventions.

This component requires an external pagination parameters configuration (PaginationParameters) and access to the GeneratePageContent service for managing dynamic content loading.

Implements

  • OnInit
  • OnChanges

Constructors

Methods

  • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

    Returns void

  • A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.

    Parameters

    • changes: SimpleChanges

      The changed properties.

    Returns void

Properties

totalPages: number = 0
currentUserPage: number = 0
handlePageChange: ((options: any) => Promise<void>)
position: string = 'middle'
location: string = 'middle'
direction: "horizontal" | "vertical" = 'horizontal'
buttonsContainerStyle: any = {}
activePageStyle: any = ...
inactivePageStyle: any = {}
backgroundColor: string = '#ffffff'
paginationHeight: number = 40
showAspect: boolean = true
parameters: PaginationParameters = ...
faStar: IconDefinition = faStar
faLock: IconDefinition = faLock
data: number[] = []

Array representing pages to be displayed in pagination controls.

componentSizes: ComponentSizes = ...

Stores calculated sizes for pagination controls.