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

fix(input): $render input even if $modelValue is empty #9681

Closed
wants to merge 1 commit into from

Conversation

Narretz
Copy link
Contributor

@Narretz Narretz commented Oct 19, 2014

$render should only be concerned if there is a $viewValue present.
When we check $isEmpty($modelValue), we assume $render is used in
context of a model -> view update. But since it is part of the public
API, it needs to work independent of internal usage.

Fixes #9156

In the end, the formatters are responsible for providing a correct value to the $render function in a model -> update. If someone uses $render manually, they are obviously responsible.

$render should only be concerned if there is a $viewValue present.
When we check $isEmpty($modelValue), we assume $render is used in
context of a model -> view update. But since it is part of the public
API, it needs to work independent of internal usage.

Fixes angular#9156
@petebacondarwin
Copy link
Contributor

@tbosch - how does this look? You changed it to use $modelValue in Narretz@3e51b84 previously.

@petebacondarwin petebacondarwin added this to the 1.3.x milestone Oct 19, 2014
@tbosch
Copy link
Contributor

tbosch commented Nov 7, 2014

@petebacondarwin looks good at first sight, but can't dig into this... Assigning to you...

@petebacondarwin
Copy link
Contributor

LGTM - merging

@Narretz
Copy link
Contributor Author

Narretz commented Nov 20, 2014

noooo

@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) at https://cla.developers.google.com/.

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 the information on your CLA or see this help article on setting the email on your git commits.

Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name.

@petebacondarwin
Copy link
Contributor

Fixed by #10164

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.

custom directive and ng-pattern interfere in rc.2
5 participants