@@ -46,7 +46,7 @@ would be lost, because the browser ignores the attribute value.
4646In the following example, the interpolation information would be ignored and the browser would simply
4747interpret the attribute as present, meaning that the button would always be disabled.
4848
49- ```html
49+ ```html
5050 Disabled: <input type="checkbox" ng-model="isDisabled" />
5151 <button disabled="{{isDisabled}}">Disabled</button>
5252```
@@ -58,7 +58,7 @@ For this reason, Angular provides special `ng`-prefixed directives for the follo
5858These directives take an expression inside the attribute, and set the corresponding boolean attribute
5959to true when the expression evaluates to truthy.
6060
61- ```html
61+ ```html
6262 Disabled: <input type="checkbox" ng-model="isDisabled" />
6363 <button ng-disabled="isDisabled">Disabled</button>
6464```
@@ -115,6 +115,19 @@ can be used with `ngAttr` instead. The following is a list of known problematic
115115- **type** in `<button>` in Internet Explorer 11 (see [issue 14117](https://github.com/angular/angular.js/issues/5025))
116116- **value** in `<progress>` in Internet Explorer = 11 (see [issue 7218](https://github.com/angular/angular.js/issues/7218))
117117
118+ ## Known Issues
119+
120+ ### Dynamically changing an interpolated value
121+
122+ You should avoid dynamically changing the content of an interpolated string (e.g. attribute value
123+ or text node). Your changes are likely to be overwriten, when the original string gets evaluated.
124+ This restriction applies to both directly changing the content via JavaScript or indirectly using a
125+ directive.
126+
127+ For example, you should not use interpolation in the value of the `style` attribute (e.g.
128+ `style="color: {{ 'orange' }}; font-weight: {{ 'bold' }};"`) **and** at the same time use a
129+ directive that changes the content of that attributte, such as `ngStyle`.
130+
118131### Embedding interpolation markup inside expressions
119132
120133<div class="alert alert-danger">
0 commit comments