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.

Add option for templateManipulator to ignore specific ng-model #358

Closed
@mikejpeters

Description

@mikejpeters

Sometimes custom templates may involve multiple directives referring to the same ng-model. For example:

<div class="dropdown">
    <input ng-model="model[options.key]">
    <a data-toggle="dropdown">Click here to show calendar</a>
    <ul class="dropdown-menu">
        <datetimepicker ng-model="model[options.key]"></datetimepicker>
    </ul>
</div>

In this situation, formly adds the same attributes to both the input and datetimepicker.

We can tell the manipulator to skip ALL attributes using skipNgModelAttrsManipulator, but what we really want is to just ignore the one on datetimepicker.

It would be great to be able to add an attribute to the actual element so it is ignored:

<datetimepicker ng-model="model[options.key]" formly-skip-ng-model-attrs-manipulator>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions