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

feat(ngModel): pass the previous and current model to view change listeners #13151

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

luaks
Copy link

@luaks luaks commented Oct 22, 2015

No description provided.

@googlebot
Copy link

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).

📝 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.

@luaks luaks force-pushed the pass-previous-model-to-view-change-listener branch from faca60a to d003ab4 Compare October 22, 2015 12:14
@Narretz
Copy link
Contributor

Narretz commented Nov 13, 2015

Technically, when ngChange is called, the model should always have been changed. What's your use case for this?

@luaks
Copy link
Author

luaks commented Nov 13, 2015

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.

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

Successfully merging this pull request may close these issues.

3 participants