@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';AuiDialogRef
Section titled “AuiDialogRef”Class.
Handle of an overlay opened by AuiDialogService or AuiDrawerService.
Methods
Section titled “Methods”| Method | Description |
|---|---|
close(result?: R | undefined): void |
Close with a result. |
AuiDialogService
Section titled “AuiDialogService”Injectable service.
Open components or templates in a modal AbsoluteUI Dialog.
Methods
Section titled “Methods”| 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. |
AuiDrawerService
Section titled “AuiDrawerService”Injectable service.
Open components or templates in an AbsoluteUI Drawer.
Methods
Section titled “Methods”| 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. |
Functions, constants, and types
Section titled “Functions, constants, and types”Constants
Section titled “Constants”AUI_DIALOG_DATA
Data passed with open(..., { data }).
const AUI_DIALOG_DATA: InjectionToken<unknown>;Interfaces
Section titled “Interfaces”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'>;