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

using ng-checked="expression" will never update the respective ng-model value. #11106

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ng/directive/attrs.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@
* @description
* The HTML specification does not require browsers to preserve the values of boolean attributes
* such as checked. (Their presence means true and their absence means false.)
* If ng-change directive used with expression like ng-change="expression",
* it will never update the binding with declared ng-model variable.
* If we put an Angular interpolation expression into such an attribute then the
* binding information would be lost when the browser removes the attribute.
* The `ngChecked` directive solves this problem for the `checked` attribute.
Expand Down