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

docs(ngModel): document that objects passed to $setViewValue should be copied #8095

Closed
petebacondarwin opened this issue Jul 7, 2014 · 1 comment

Comments

@petebacondarwin
Copy link
Contributor

ngModel doesn't watch $viewValue objects deeply and also does not make copies of those objects. This means that changes to the properties of those objects does not trigger ngModel changes.

So if your input directive provides objects (e.g. Date objects) to $setViewValue then it should make a copy before sending it into $setViewValue.

See #7965

@petebacondarwin
Copy link
Contributor Author

@shahata - fancy knocking this up?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant