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.

ngAnimate cause disconnect between ng-valid class and $valid property. #12336

Closed
@shoha

Description

@shoha

Plunker: http://plnkr.co/edit/Cay4NUVyps3rNneBm244

I have an issue in 1.4.2 when using ngAnimate with a form. The bug seems to occur when an external watcher updates a model value. In the attached Plunker you can see that there is an input which is validated by its length. At the same time, there is a watcher on $viewValue which restricts the length of the same input to that length. When the input reaches that length, typing additional characters triggers the validator and watcher (then the validator again, after the watcher changes the value). The end result is $valid being true, as shown in the Plunker.

In 1.3.16 with and without ngAnimate, and in 1.4.2 without ngAnimate, this works as expected. However, on 1.4.2 with ngAnimate the validity classes fall out of sync with the state of the model.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions