@favian/headwind-ui
Version:
Headless UI for Angular - Styleless Angular components to integrate with Tailwind CSS
23 lines (22 loc) • 1.06 kB
TypeScript
import { ApplicationRef, EmbeddedViewRef, TemplateRef, ViewContainerRef } from '@angular/core';
import * as i0 from "@angular/core";
export declare class HeadwindOverlayService {
private readonly _applicationRef;
private _openedViewRefs;
/**
* By default, opening an overlay will create viewContainerRef to render overlay.
* Once viewContainerRef is created, that is cached to this property to prevent creating multiple viewContainerRefs.
*/
private _cachedViewContainerRef?;
constructor(_applicationRef: ApplicationRef);
get viewContainerRef(): ViewContainerRef;
/**
* Open a template as overlay
* @param templateRef - TemplateRef to open as an overlay
* @param onDestroy - Callback to call when destroying EmbeddedViewRef
*/
open<C = any>(templateRef: TemplateRef<C>, onDestroy?: () => void): EmbeddedViewRef<C>;
closeLatest(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<HeadwindOverlayService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<HeadwindOverlayService>;
}