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.
Bug: $asyncValidators destroys data bound model property #10035
Open
Description
In v.1.3.2, when an $asyncValidator
promise is rejected, Angular sets the data bound property to undefined
. This effectively destroys what was a previously valid value for that property.
This seems very wrong to me. I'm curious if this was intended behavior; if so I'd like to know what could possibly justify permanently erasing the model property's value.
I've written a plunker to illustrate the behavior; it's README explains the behavior in greater detail and elaborates on the dangers of this feature.
I highly recommend avoiding $asyncValidator
until this behavior is fixed.