@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Interface UIModalContent<R>

    Interface that modal content components should implement.

    The only requirement is to inject the ModalRef so the component can close itself and optionally return a result.

    @Component({ selector: 'ui-confirm-dialog', standalone: true, ... })
    export class UIConfirmDialog implements UIModalContent<boolean> {
    readonly modalRef = inject(ModalRef<boolean>);

    confirm(): void { this.modalRef.close(true); }
    cancel(): void { this.modalRef.close(false); }
    }
    interface UIModalContent<R = unknown> {
        modalRef: ModalRef<R>;
    }

    Type Parameters

    • R = unknown
    Index

    Properties

    Properties

    modalRef: ModalRef<R>

    Injected reference used to close the modal and return a result.