ObjectMetadataElementTemplateDirective
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>Directive Metadata
Section titled “Directive Metadata”Selector: [yuvMetadataElementTemplate]
Standalone: Yes
Implements: OnInit, OnDestroy
Inputs
Section titled “Inputs”propertyName
Section titled “propertyName”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.
propertyType
Section titled “propertyType”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.
situation
Section titled “situation”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.
yuvMetadataElementTemplate
Section titled “yuvMetadataElementTemplate”Type: string
Bucket to register the template. Use ‘default’ for templates that should be used across all situations.