Directive
DfTemplate
@ng-forge/dynamic-forms
Marks an <ng-template> projected into <df-dynamic-form> content as
available to template addons by name.
The host form collects all DfTemplate instances via contentChildren
and exposes them through {@link DF_FIELD_TEMPLATES}, where the template
addon kind looks them up by templateKey at render time.
Signature
class DfTemplateProperties
| Name | Type | Description |
|---|---|---|
dfTemplate | InputSignal<string> | Name this template registers under — referenced from TemplateAddon.templateKey. |
templateRef | TemplateRef<unknown> | The wrapped template, captured for registration and NgTemplateOutlet rendering. |
Examples
<df-dynamic-form [config]="config">
<ng-template dfTemplate="searchIcon" let-field>
<my-icon [field]="field" />
</ng-template>
</df-dynamic-form>packages/dynamic-forms/src/lib/directives/df-template.directive.ts:25