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

Commit 9f3165a

Browse files
committed
docs(guide/interpolation): make some minor improvements, add info
- highlight that interpolation inside expressions is bad practice - add info about type attr in buttons in IE
1 parent e8705d6 commit 9f3165a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/content/guide/interpolation.ngdoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,20 @@ For example, to bind to `viewBox`, we can write:
9898
</svg>
9999
```
100100

101-
The following attributes are also known to cause problems when used with normal bindings:
101+
Other attributes may also not work as expected when they contain interpolation markup, and
102+
can be used with `ngAttr` instead. The following is a list of known problematic attributes:
102103

103-
- **size** in `<select>` elements (see [Github issue 1619](https://github.com/angular/angular.js/issues/1619))
104-
- **placeholder** in `<textarea>` in Internet Explorer 10/11 (see [Github issue 5025](https://github.com/angular/angular.js/issues/5025))
104+
- **size** in `<select>` elements (see [issue 1619](https://github.com/angular/angular.js/issues/1619))
105+
- **placeholder** in `<textarea>` in Internet Explorer 10/11 (see [issue 5025](https://github.com/angular/angular.js/issues/5025))
106+
- **type** in `<button>` in Internet Explorer 11 (see [issue 14117](https://github.com/angular/angular.js/issues/5025))
105107

106108

107109
### Embedding interpolation markup inside expressions
108110

109-
Angular directives take either expressions or interpolation markup with embedded expressions. So the
110-
following example which embeds interpolation inside an expression is a bad practice:
111+
<div class="alert alert-danger">
112+
**Note:** Angular directive attributes take either expressions *or* interpolation markup with embedded expressions.
113+
It is considered **bad practice** to embed interpolation markup inside an expression:
114+
</div>
111115

112116
```html
113117
<div ng-show="form{{$index}}.$invalid"></div>

0 commit comments

Comments
 (0)