@@ -46,7 +46,7 @@ would be lost, because the browser ignores the attribute value.
46
46
In the following example, the interpolation information would be ignored and the browser would simply
47
47
interpret the attribute as present, meaning that the button would always be disabled.
48
48
49
- ```html
49
+ ```html
50
50
Disabled: <input type="checkbox" ng-model="isDisabled" />
51
51
<button disabled="{{isDisabled}}">Disabled</button>
52
52
```
@@ -58,7 +58,7 @@ For this reason, Angular provides special `ng`-prefixed directives for the follo
58
58
These directives take an expression inside the attribute, and set the corresponding boolean attribute
59
59
to true when the expression evaluates to truthy.
60
60
61
- ```html
61
+ ```html
62
62
Disabled: <input type="checkbox" ng-model="isDisabled" />
63
63
<button ng-disabled="isDisabled">Disabled</button>
64
64
```
@@ -115,6 +115,19 @@ can be used with `ngAttr` instead. The following is a list of known problematic
115
115
- **type** in `<button>` in Internet Explorer 11 (see [issue 14117](https://github.com/angular/angular.js/issues/5025))
116
116
- **value** in `<progress>` in Internet Explorer = 11 (see [issue 7218](https://github.com/angular/angular.js/issues/7218))
117
117
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
+
118
131
### Embedding interpolation markup inside expressions
119
132
120
133
<div class="alert alert-danger">
0 commit comments