-
Notifications
You must be signed in to change notification settings - Fork 27.4k
input[type=radio] with object behind ng-model #6668
Conversation
Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
This change has come up a few times before, I recall there are a few concerns, one of which is the potential performance cost (which may be fine for you, but may be harder on an different applications). So there are actually things you can do to make this nicer, like use the value as an property name in an object containing the object values. I'm not really opposed to the change, but these things have been raised before, so it might be better to find a solution which provides a sort of compromise |
What if we use angular.isObject before use == or angular.equals in $render? |
It would be nice to compare objects correctly 👍 Having the same issue with |
I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS. Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match. If you signed the CLA as a corporation, please let us know the company's name. Thanks a bunch! PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR. |
I have signed CLA. |
CLA signature verified! Thank you! Someone from the team will now triage your PR and it will be processed based on the determined priority (doc updates and fixes with tests are prioritized over other changes). |
02dc2aa
to
fd2d6c0
Compare
cad9560
to
f294244
Compare
e8dc429
to
e83fab9
Compare
4dd5a20
to
998c61c
Compare
This will be fixed on the ngModel level, see #12783 |
Request Type: bug
How to reproduce: Use object for ng-model for input[radio]
Component(s): misc core
Impact: medium
Complexity: small
This issue is related to:
Detailed Description:
Other Comments:
If you use object as models with radio, then the
$render
method won't be ever called, because of{} == {}
is alwaysfalse
. So we should use angular.equals instead of ==.