Returned by ModalService.openModal and injected into the
content component. The opener subscribes to closed to
receive the result; the content component calls close to
dismiss the dialog.
Example
// Inside a modal content component readonlymodalRef = inject(ModalRef<string>);
Observable that emits the result value when the modal closes,
then completes. Emits undefined when closed without a result
(e.g. Escape key or backdrop click).
Reference to an open modal dialog.
Returned by ModalService.openModal and injected into the content component. The opener subscribes to closed to receive the result; the content component calls close to dismiss the dialog.
Example