Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit d057f73

Browse files
authored
docs(template-syntax): interpolation only for strings #3041 (#3066)
1 parent f60703d commit d057f73

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: public/docs/ts/latest/guide/template-syntax.jade

+3-4
Original file line numberDiff line numberDiff line change
@@ -571,15 +571,14 @@ a(id="one-time-initialization")
571571
The following binding pairs do the same thing:
572572
+makeExample('template-syntax/ts/app/app.component.html', 'property-binding-vs-interpolation')(format=".")
573573
:marked
574-
Interpolation is a convenient alternative for property binding in many cases.
575-
In fact, Angular translates those interpolations into the corresponding property bindings
576-
before rendering the view.
574+
_Interpolation_ is a convenient alternative to _property binding_ in many cases.
577575

578-
There is no technical reason to prefer one form to the other.
576+
When rendering data values as strings, there is no technical reason to prefer one form to the other.
579577
We lean toward readability, which tends to favor interpolation.
580578
We suggest establishing coding style rules and choosing the form that
581579
both conforms to the rules and feels most natural for the task at hand.
582580

581+
When setting an element property to a non-string data value, you must use _property binding_.
583582

584583
:marked
585584
#### Content security

0 commit comments

Comments
 (0)