Skip to content

ObjectMetadataElementTemplateDirective

directive

Directive to be applied to a ng-template. It will register the template as a form element used by object-form component.

Context is provided with the following fields:

  • situation: form situation ‘EDIT’, ‘CREATE’, ‘SEARCH’

  • field: ObjectTypeField

  • ngControl: Reactive FormControl

Example :

<ng-template yuvMetadataElementTemplate propertyType="boolean:switch" let-ctx>...</ng-template>

Selector: [yuvMetadataElementTemplate]

Standalone: Yes

Implements: OnInit, OnDestroy

Type: string

Pick registered metadata element by name. You need to set either propertyType or propertyName to get a template. Setting a name and a type, the name will be used because it is more precise.

Type: string

Internal property type to get the registered template. You need to set either propertyType or propertyName to get a template. Setting a name and a type, the name will be used because it is more precise.

Type: Situation

Default Value: Situation.EDIT

Situation to register the template for. So only object forms for that situation (CREATE, EDIT, SEARCH) will use the template. Defaults to EDIT.

Type: string

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