Thin service over CDK Overlay that returns a typed CngxOverlayRef
CngxOverlay
InjectablePrimaryv0.1.0WCAG AA
projects/ui/overlay/overlay.service.ts
Import#
import { CngxOverlay } from '@cngx/ui/overlay'
Description#
Thin service over CDK Overlay that returns a typed CngxOverlayRef.
Must be provided via provideOverlay() in application or component providers.
// app.config.ts
provideOverlay()
// usage
const ref = overlayService.open(MyComponent, { hasBackdrop: true });
ref.afterClosed$.subscribe(result => console.log(result));Index#
Methods
Methods#
open#
CngxOverlayRefopen(component: Type, config: CngxOverlayConfig) Opens component in a CDK overlay panel and returns a typed ref.
Defaults to a centered, backdropped panel. Merge config to override
position strategy, scroll strategy, or any other CDK OverlayConfig option.
@paramcomponent
TypeComponent class to attach as a portal.
CDK overlay configuration overrides.