Dynamic Component Loader
cf-dynamic-component-loader
Loader of existing components.
Using logic
Include in entryComponents array of your app.ts file all components needed to be dynamically loaded. Also add functionality.
app.ts
app.html
app.scss
Component loader componentData properties
Attr
Type
Details
component
string
Component name
inputs
object
Component input parameters
loadedInstance
ElementRef
Reference to ComponentRef of the current component instance. Important: NOT to pass - it's set by dynalic loader after loading component and can be used to destroy component.
id
string
Component ID - to pass if you want it to be set for the specific value, i.e. for ID from storage.
Last updated