Skip to content

@absoluteui/angular/overlay

Open dialogs and drawers from components or templates, pass data, and read results.

import { AuiDialogRef, AuiDialogService, AuiDrawerService, AUI_DIALOG_DATA } from '@absoluteui/angular/overlay';

Class.

Handle of an overlay opened by AuiDialogService or AuiDrawerService.

Method Description
close(result?: R | undefined): void Close with a result.

Injectable service.

Open components or templates in a modal AbsoluteUI Dialog.

Method Description
open<R = unknown, D = unknown>(content: Type<unknown> | TemplateRef<AuiOverlayTemplateContext<D, R>>, config: AuiDialogConfig<D>): AuiDialogRef<R> Open a component (it can inject AUI_DIALOG_DATA and AuiDialogRef) or a template in a modal dialog.

Injectable service.

Open components or templates in an AbsoluteUI Drawer.

Method Description
open<R = unknown, D = unknown>(content: Type<unknown> | TemplateRef<AuiOverlayTemplateContext<D, R>>, config: AuiDrawerConfig<D>): AuiDialogRef<R> Open a component (it can inject AUI_DIALOG_DATA and AuiDialogRef) or a template in a drawer.

AUI_DIALOG_DATA

Data passed with open(..., { data }).

const AUI_DIALOG_DATA: InjectionToken<unknown>;

AuiOverlayClosed

How an overlay opened by a service was closed.

interface AuiOverlayClosed<R> {
readonly result: R | undefined;
readonly returnValue: string;
}

AuiOverlayTemplateContext

Context of a template opened by a service: let-data and let-ref="ref".

interface AuiOverlayTemplateContext<D, R> {
readonly $implicit: D;
readonly ref: AuiDialogRef<R>;
}

AuiDialogConfig

Options of AuiDialogService.open: title, description, data for the content, and the Dialog options.

type AuiDialogConfig<D = unknown> = OverlayCommon<D> & Omit<DialogOptions, 'title' | 'description' | 'content'>;

AuiDrawerConfig

Options of AuiDrawerService.open: title, description, data for the content, and the Drawer options.

type AuiDrawerConfig<D = unknown> = OverlayCommon<D> & Omit<DrawerOptions, 'title' | 'description' | 'content'>;