Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

angular formly use value in a templateOptions custom property for hideExpression #763

Open
@falinsin

Description

@falinsin

I want to hide the phone fiels if name field templateOptions custom property value is 'V1'

{
            "key": "name",
            "type": "text",
            "templateOptions": {
              "myCondition":"V1",
              "label": "Name"
            }

},
{
            "key": "phone",
            "type": "text",
            "templateOptions": {
              "label": "Phone"
            },
        "hideExpression": "model.name.templateOptions.myCondition=='V1'"        
}

but this way is not working.

How can I use templateOptions properties in hideExpression. How can I reference values in this properties for use in expresions in field definitions.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions