feat(ngModel): pass the previous and current model to view change listeners
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.
- If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
- If you signed the CLA as a corporation, please let us know the company's name.
Technically, when ngChange is called, the model should always have been changed. What's your use case for this?
We are using this, to compare the old and new values of the form elements.
When autosaving we build a model from the valid values to be sent to the server, but want to keep the possibly invalid new value, for the user to still be editable, even if they leave the invalid field.