# new ModelRendererComponent(injector)
This component is responsible for dynamically rendering models, handling model changes, and managing event subscriptions for the rendered components. It uses the NgxRenderingEngine to render the models and supports both string and Model inputs.
Component for rendering dynamic models
Parameters:
| Name | Type | Description |
|---|---|---|
injector |
Injector
|
Angular Injector for dependency injection |
Example
<ngx-decaf-model-renderer
[model]="myModel"
[globals]="globalVariables"
(listenEvent)="handleEvent($event)">
</ngx-decaf-model-renderer>
Members
# projectable
Set if render content projection is allowed
.Set if render content projection is allowed
- Default Value:
- true
View Source lib/components/model-renderer/model-renderer.component.ts, line 54
boolean
# projectable
Set if render content projection is allowed
.Set if render content projection is allowed
- Default Value:
- true
View Source lib/components/model-renderer/model-renderer.component.ts, line 110
Methods
# async ngOnChanges(changes) → {Promise.<void>}
Lifecycle hook that is called when data-bound properties of a directive change
.Lifecycle hook that is called when data-bound properties of a directive change
Parameters:
| Name | Type | Description |
|---|---|---|
changes |
SimpleChanges
|
Object containing changes |
Promise.<void>
# async refresh(model) → {Promise.<void>}
Refreshes the rendered model
.Refreshes the rendered model
Parameters:
| Name | Type | Description |
|---|---|---|
model |
string
|
M
|
The model to be rendered |
Promise.<void>