Skip to content

ObjectMetadataElementRawDirective

directive

Directive to be applied to an ng-template that renders only the raw form widget for a metadata property (without the surrounding mat-form-field label/hint/error shell). The template is registered in the raw bucket of MetadataFormElementRegistry, parallel to the wrapped templates registered via yuvMetadataElementTemplate.

Use this to expose a type-aware input that can be composed into custom layouts — for example smart-search, where conditions are built inline as a pill chain and a full form-field shell would be visually wrong.

Example :

<ng-template #rawString yuvMetadataElementRaw="default" propertyType="string" let-ctx>
<yuv-string [formControl]="ctx.ctrl" [required]="ctx.field.required" />
</ng-template>

Selector: [yuvMetadataElementRaw]

Standalone: Yes

Implements: OnInit, OnDestroy

Type: string

Register the raw template by metadata field name.

Type: string

Internal property type to register the template under. You need to set either propertyType or propertyName. When both are set, propertyName wins because it is more precise.

Type: Situation

Default Value: Situation.EDIT

Situation to register the template for. Defaults to EDIT.

Type: string

Bucket to register the template. Use ‘default’ for templates that should be used across all situations.