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.
Determines if the requests modal is visible.
Counter for the number of requests.
List of requests.
Name of the room.
Socket instance for communication.
Background color of the modal.
Position of the modal.
Additional parameters for the modal.
Callback function when the modal is closed.
Callback function when the request filter changes.
Callback function when a request item is pressed.
Function to update the request list.
FontAwesome icon for closing the modal.
Filtered list of requests.
Counter for the filtered list of requests.
Flag to trigger re-rendering.
Component
RequestsModal
Description
A modal component to display and manage requests.
Selector
app-requests-modal
Standalone
true
Imports
[CommonModule, FontAwesomeModule, RenderRequestComponent]
Template Url
./requests-modal.component.html
Style Urls
./requests-modal.component.css
Param: respondToRequestsService
Service to handle request responses.
Method
ngOnInit - Lifecycle hook that is called after data-bound properties are initialized.
Method
ngOnChanges - Lifecycle hook that is called when any data-bound property changes.
Param: changes
Object of current and previous property values.
Method
updateRequests - Updates the request list and counter based on the current parameters.
Method
handleModalClose - Handles the modal close action.
Method
handleFilterChange - Handles the filter change event.
Param: event
The filter change event.
Example