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

fix(input): always pass in the model value to ctrl.$isEmpty #9017

Closed
wants to merge 1 commit into from

Conversation

tbosch
Copy link
Contributor

@tbosch tbosch commented Sep 10, 2014

Fixes #5164

@tbosch
Copy link
Contributor Author

tbosch commented Sep 10, 2014

Closes #8979

@@ -1260,7 +1258,7 @@ function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filt
element[0].checked = ctrl.$viewValue;
};

// Override the standard `$isEmpty` because a value of `false` means empty in a checkbox.
// Override the standard `$isEmpty` because an empty checkbox is always not equal to the trueValue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to reword as "an empty checkbox is never equal to the trueValue"?

@jeffbcross
Copy link
Contributor

Some docs comments but otherwise LGTM

@tbosch tbosch closed this Sep 10, 2014
@tbosch tbosch deleted the checkboxrequired branch September 10, 2014 18:46
tbosch added a commit that referenced this pull request Sep 10, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng-required conflicts with ng-true-value
3 participants