projects/common/dialog/dialog/dialog-ref.ts
import { DialogRef } from '@cngx/common/dialog'
Signal-based dialog reference.
exportAs
#dlg="cngxDialog"
inject(DIALOG_REF)
Signal
Unique ID of this dialog instance.
Current lifecycle state of the dialog.
The typed result of the dialog.
undefined
open()
'dismissed'
T
CngxAsyncState
Async state of the submit channel.
Populated when [submitAction] is set - tracks the submit lifecycle (idle -> pending -> success/error). When submitAction is not set, this is a static idle state.
[submitAction]
idle
pending
success
error
submitAction
Bind to any state consumer: <cngx-alert [state]="dlg.submitState" />.
<cngx-alert [state]="dlg.submitState" />
void
close(value: T)
Close the dialog with a typed result value.
Dismiss the dialog without a result (Escape / backdrop).