File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 159
159
*
160
160
* @description
161
161
*
162
- * We shouldn't do this, because it will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:
162
+ * The HTML specification does not require browsers to preserve the values of boolean attributes
163
+ * such as disabled. (Their presence means true and their absence means false.)
164
+ * If we put an Angular interpolation expression into such an attribute then the
165
+ * binding information would be lost when the browser removes the attribute.
166
+ *
167
+ * For example, this code will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:
163
168
* ```html
164
169
* <div ng-init="scope = { isDisabled: false }">
165
170
* <button disabled="{{scope.isDisabled}}">Disabled</button>
166
171
* </div>
167
172
* ```
168
173
*
169
- * The HTML specification does not require browsers to preserve the values of boolean attributes
170
- * such as disabled. (Their presence means true and their absence means false.)
171
- * If we put an Angular interpolation expression into such an attribute then the
172
- * binding information would be lost when the browser removes the attribute.
173
174
* The `ngDisabled` directive solves this problem for the `disabled` attribute.
174
175
* This complementary directive is not removed by the browser and so provides
175
176
* a permanent reliable place to store the binding information.
You can’t perform that action at this time.
0 commit comments