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

ngModelWatch breaks if $modelValue is object #6648

@serzh

Description

@serzh

When using ngModel inside custom directive there is a chance to break ngModelWatch fn. On the first run ngModelWatch will set $modelValue to ngModelGet($scope). Then, if you change property of that scope var (ngModelGet($scope)) it will change the properties on the $modelValue, because it is the same object! So if you have some $formatters they won't be called at all.

Here is plnkr for demonstration.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions