Module

lib/engine/NgxRenderingEngine

Angular rendering engine for Decaf model-driven UIs.

View Source lib/engine/NgxRenderingEngine.ts, line 2

Classes

NgxRenderingEngine

This class extends the base RenderingEngine to provide Angular-specific rendering capabilities. It handles the conversion of field definitions to Angular components, manages component registration, and provides utilities for component creation and input handling. The engine converts model decorator metadata into dynamically created Angular components with proper input binding and lifecycle management.

NgxRenderingEngine#NgxRenderingEngine

Initializes a new instance of the Angular rendering engine by calling the parent constructor with the 'angular' engine type identifier. This constructor sets up the base rendering engine functionality with Angular-specific configurations and prepares the instance for component registration and rendering operations.

exports.NgxRenderingEngine

Initializes a new instance of the Angular rendering engine by calling the parent constructor with the 'angular' engine type identifier. This constructor sets up the base rendering engine functionality with Angular-specific configurations and prepares the instance for component registration and rendering operations.

Methods

# static NgxRenderingEngine#getDecorators(model, globalProps) → {FieldDefinition.<AngularFieldDefinition>}

This method provides access to the field definition generated from a model's decorators. It's a convenience wrapper around the toFieldDefinition method that converts a model to a field definition based on its decorators and the provided global properties.

Extracts decorator metadata from a model.

Parameters:
Name Type Description
model Model

The model to extract decorators from

globalProps Record.<string, unknown>

Global properties to include in the field definition

View Source lib/engine/NgxRenderingEngine.ts, line 673

The field definition generated from the model

FieldDefinition.<AngularFieldDefinition>

# async static NgxRenderingEngine#initialize() → {Promise.<void>}

This method initializes the rendering engine. It checks if the engine is already initialized and sets the initialized flag to true. This method is called before the engine is used to ensure it's properly set up for rendering operations.

Initializes the rendering engine.

View Source lib/engine/NgxRenderingEngine.ts, line 731

A promise that resolves when initialization is complete

Promise.<void>

# static NgxRenderingEngine#render(model, globalProps, vcr, injector, tpl) → {AngularDynamicOutput}

This method takes a model and converts it to an Angular component output. It first stores a reference to the model, then converts it to a field definition using the base RenderingEngine's toFieldDefinition method, and finally converts that field definition to an Angular component output using fromFieldDefinition.

Renders a model into an Angular component output.

sequenceDiagram participant Client as Client Code participant Render as render method participant ToField as toFieldDefinition participant FromField as fromFieldDefinition Client->>Render: render(model, globalProps, vcr, injector, tpl) Render->>Render: Store model reference Render->>ToField: toFieldDefinition(model, globalProps) ToField-->>Render: fieldDef Render->>FromField: fromFieldDefinition(fieldDef, vcr, injector, tpl) FromField-->>Render: AngularDynamicOutput Render-->>Client: return AngularDynamicOutput
Parameters:
Name Type Description
model M

The model to render

globalProps Record.<string, unknown>

Global properties to pass to the component

vcr ViewContainerRef

The view container reference for component creation

injector Injector

The Angular injector for dependency injection

tpl TemplateRef.<any>

The template reference for content projection

View Source lib/engine/NgxRenderingEngine.ts, line 719

The Angular component output with component reference and inputs

AngularDynamicOutput