File

packages/core/src/lib/services/dynamic-component/dynamic-component.service.ts

Index

Methods

Methods

Public add
add(component: ComponentType, el?: ElementRef, config?: any)
Type parameters :
  • T

Adds a component to portal host dynamically

Parameters :
Name Type Optional Description
component ComponentType<T> No

The component to be injected

el ElementRef Yes

The element reference for the component to be injected

config any Yes

The data to be passed (config) for the DYNAMIC_COMPONENT_CONFIG token

Returns : any
Public remove
remove(portalHostRef: DomPortalOutlet)

detaches a portalHost

Parameters :
Name Type Optional Description
portalHostRef DomPortalOutlet No

reference of portal host to be detached

Returns : void

results matching ""

    No results matching ""