You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
unchecking any checkbox (with and without ng-true-value) results in the model to be set to undefined. However: An invalid input should not update the model at all!
the second checkbox which has an ng-true-value shows an required error on load although it is checked. Unchecking it resets the model as well (which is already wrong), but checking it again does not set the model value to the ng-true-value back.
This still happens. The problem is that $isEmpty is called with the viewValue, and checkboxInputType's $isEmpty returns true when the viewValue is unequal to the trueValue, which will almost always be the case.
Activity
matsko commentedon May 7, 2014
This should fix the issue: #7377
fix(NgModel): make sure the required validator uses the $validators p…
fix(NgModel): make sure the required validator uses the $validators p…
fix(NgModel): make sure the required validator uses the $validators p…
fix(NgModel): make sure the required validator uses the $validators p…
fix(NgModel): make sure the required validator uses the $validators p…
tbosch commentedon Aug 4, 2014
This is still not working, see this punker with current 1.3.x version (http://plnkr.co/edit/VUAVYLLchaq5bNwgseRp?p=preview)
ng-true-value) results in the model to be set toundefined. However: An invalid input should not update the model at all!ng-true-valueshows an required error on load although it is checked. Unchecking it resets the model as well (which is already wrong), but checking it again does not set the model value to theng-true-valueback.matsko commentedon Aug 4, 2014
I'll work on this today.
Narretz commentedon Sep 7, 2014
This still happens. The problem is that $isEmpty is called with the viewValue, and checkboxInputType's $isEmpty returns true when the viewValue is unequal to the trueValue, which will almost always be the case.
Narretz commentedon Sep 7, 2014
I have a fix for this. Will send PR later.
fix(input): make checkbox ngTrueValue work with required
fix(input): make checkbox ngTrueValue work with required
fix(input): set ngTrueValue on required checkbox
fix(input): set ngTrueValue on required checkbox
fix(input): always pass in the model value to `ctrl.$isEmpty`
fix(input): set ngTrueValue on required checkbox
fix(input): set ngTrueValue on required checkbox
fix(input): set ngTrueValue on required checkbox