Fired when the user cancels (button, backdrop, Esc, or ✕). The dialog auto-closes.
Dismiss button label.
Fired when the user confirms. The dialog stays open; close it when ready.
Affirmative button label.
Optional secondary line, rendered smaller/muted beneath the message.
Font Awesome icon class (e.g. "fa-solid fa-trash") for the header. When
omitted, a sensible default is chosen from Type. Set to '' for no icon.
Primary prompt text. For rich content, project default <ng-content> instead.
When true, shows a spinner on the confirm button, disables both buttons, and
blocks dismissal (Esc / backdrop / ✕) — bind this to your loading flag while
the Confirmed handler runs async work.
Heading shown in the dialog title bar.
Visual intent — drives the header icon + confirm button color. Defaults to 'default'.
Whether the dialog is shown. Two-way bindable: [(Visible)].
Two-way Visible change channel — fires when the dialog auto-closes on cancel.
mjButton variant for the confirm button — red for danger, blue otherwise.
Icon actually rendered: the explicit Icon when provided (including ""
to suppress it), otherwise the per-type default.
mj-confirm-dialog — Canonical confirmation prompt. The shared replacement for native
window.confirm()and the many hand-rolled "Are you sure?" modals (@if (showDeleteConfirm) { … backdrop + centered dialog }) scattered across the app, plus the duplicate localmj-confirm-dialog/mj-ev-confirm-dialogcomponents.Built on
<mj-dialog>(so it inherits the backdrop, animations, mobile full-screen behavior, and Esc/backdrop handling) and usesrole="alertdialog"for screen readers. Buttons follow the MJ convention: the affirmative action is leftmost, Cancel on the right.Visibility is two-way bindable. Cancelling (Cancel button, backdrop, Esc, or the ✕) auto-closes and emits
Cancelled. Confirming emitsConfirmedand leaves the dialog open so the handler can run async work — setVisibletofalse(or update your bound property) when done. Bind[Processing]to a loading flag during that async work to show a spinner, disable both buttons, and block dismissal until it completes.Usage: