Class

ModelRendererComponent

.component~ModelRendererComponent(injector)

Constructor

# 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

sequenceDiagram participant App participant ModelRenderer participant RenderingEngine participant Model App->>ModelRenderer: Input model ModelRenderer->>Model: Parse if string Model-->>ModelRenderer: Parsed model ModelRenderer->>RenderingEngine: Render model RenderingEngine-->>ModelRenderer: Rendered output ModelRenderer->>ModelRenderer: Subscribe to events ModelRenderer-->>App: Emit events
Parameters:
Name Type Description
injector Injector

Angular Injector for dependency injection

View Source lib/components/model-renderer/model-renderer.component.ts, line 49

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

View Source lib/components/model-renderer/model-renderer.component.ts, line 126

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

View Source lib/components/model-renderer/model-renderer.component.ts, line 118

Promise.<void>