docs(ngChecked): note that it shouldn't be used with ngModel
Closes #11106
This commit is contained in:
@@ -206,6 +206,13 @@
|
||||
* @priority 100
|
||||
*
|
||||
* @description
|
||||
* Sets the `checked` attribute on the element, if the expression inside `ngChecked` is truthy.
|
||||
*
|
||||
* Note that this directive should not be used together with {@link ngModel `ngModel`},
|
||||
* as this can lead to unexpected behavior.
|
||||
*
|
||||
* ### Why do we need `ngChecked`?
|
||||
*
|
||||
* 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 we put an Angular interpolation expression into such an attribute then the
|
||||
@@ -230,7 +237,7 @@
|
||||
*
|
||||
* @element INPUT
|
||||
* @param {expression} ngChecked If the {@link guide/expression expression} is truthy,
|
||||
* then special attribute "checked" will be set on the element
|
||||
* then the `checked` attribute will be set on the element
|
||||
*/
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user