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.
OptionaloverlayOptionalcontentOptionalcustom
ConfirmExitModal - Confirmation dialog for leaving or being removed from a session
Component
Description
Displays a confirmation modal when a user attempts to leave a room or session. Supports optional ban action for host/admin users.
Supports three levels of customization:
Key Features:
Example
Basic Usage:
Example
Style Customization:
Example
Custom Template Override:
Selector
app-confirm-exit-modal
Standalone
true
Imports
CommonModule, FormsModule, FontAwesomeModule
Input
isConfirmExitModalVisible - Whether the modal is currently visible. Default:
falseInput
onConfirmExitClose - Callback function to close the modal. Default:
() => {}Input
position - Modal position on screen ('topRight', 'topLeft', 'bottomRight', 'bottomLeft'). Default:
'topRight'Input
backgroundColor - Background color of the modal content. Default:
'#83c0e9'Input
exitEventOnConfirm - Callback invoked when exit is confirmed. Default:
undefinedInput
member - Name/ID of the member being removed or leaving. Default:
''Input
ban - Whether to ban the member (in addition to removing). Default:
falseInput
roomName - Name of the room/session being exited. Default:
''Input
socket - Socket.io client instance for real-time communication. Default:
undefinedInput
islevel - User level/role (e.g., '0' for host, '2' for participant). Default:
'2'Input
overlayStyle - Custom CSS styles for the modal overlay backdrop. Default:
undefinedInput
contentStyle - Custom CSS styles for the modal content container. Default:
undefinedInput
customTemplate - Custom TemplateRef to completely replace default modal template. Default:
undefinedMethod
ngOnInit - Initializes default modal content styles
Method
ngOnChanges - Updates visibility state and modal styles when inputs change
Method
handleConfirmExit - Executes exit confirmation logic and closes modal
Method
getCombinedOverlayStyle - Merges default and custom overlay styles
Method
getCombinedContentStyle - Merges default and custom content styles