diff --git a/public/docs/_examples/template-syntax/dart/lib/app_component.dart b/public/docs/_examples/template-syntax/dart/lib/app_component.dart index 26f2c82625..6a3def5aa4 100644 --- a/public/docs/_examples/template-syntax/dart/lib/app_component.dart +++ b/public/docs/_examples/template-syntax/dart/lib/app_component.dart @@ -176,7 +176,12 @@ class AppComponent implements OnInit, AfterViewInit { // #enddocregion NgStyle String title = 'Template Syntax'; + // #docregion evil-title + String evilTitle = 'Template Syntax'; + // #enddocregion evil-title + String toeChoice; + String toeChooser(Element picker) { List choices = picker.children; for (var i = 0; i < choices.length; i++) { diff --git a/public/docs/_examples/template-syntax/dart/lib/app_component.html b/public/docs/_examples/template-syntax/dart/lib/app_component.html index 5381bd4024..9fd72765ed 100644 --- a/public/docs/_examples/template-syntax/dart/lib/app_component.html +++ b/public/docs/_examples/template-syntax/dart/lib/app_component.html @@ -197,13 +197,18 @@

-Interpolated:
-Property bound: +

is the interpolated image.

+

is the property bound image.

-
The interpolated title is {{title}}
-
+

"{{title}}" is the interpolated title.

+

"" is the property bound title.

+ +

"{{evilTitle}}" is the interpolated evil title.

+

"" is the property bound evil title.

+ + top diff --git a/public/docs/ts/_cache/guide/template-syntax.jade b/public/docs/ts/_cache/guide/template-syntax.jade index 3e0fb06ce8..9cc8fcdec3 100644 --- a/public/docs/ts/_cache/guide/template-syntax.jade +++ b/public/docs/ts/_cache/guide/template-syntax.jade @@ -858,8 +858,21 @@ block style-property-name-dart-diff header [()] = banana in a box :marked To remember that the parentheses go inside the brackets, visualize a *banana in a box*. + ++ifDocsFor('ts|js') + .callout.is-important + header FormsModule is Required to use ngModel + :marked + Before we can use `ngModel` two-way data binding, we need to import the `FormsModule` + package in our Angular module. We add it to the `NgModule` decorator's `imports` array. This array contains the list + of external modules used by our application. +
Learn more about the `FormsModule` and `ngModel` in the + [Forms](../guide/forms.html#ngModel) chapter. + + +makeExample('template-syntax/ts/app/app.module.1.ts', '', 'app.module.ts (FormsModule import)') + :marked - Alternatively, we can use the canonical prefix form: + Alternatively to using `[(ngModel)]`, we can use the canonical prefix form: +makeExample('template-syntax/ts/app/app.component.html', 'NgModel-2')(format=".") :marked There’s a story behind this construction, a story that builds on the property and event binding techniques we learned previously. diff --git a/public/docs/ts/latest/guide/template-syntax.jade b/public/docs/ts/latest/guide/template-syntax.jade index 9cf213cb1d..9cc8fcdec3 100644 --- a/public/docs/ts/latest/guide/template-syntax.jade +++ b/public/docs/ts/latest/guide/template-syntax.jade @@ -859,16 +859,17 @@ block style-property-name-dart-diff :marked To remember that the parentheses go inside the brackets, visualize a *banana in a box*. -.callout.is-important - header FormsModule is Required to use ngModel - :marked - Before we can use `ngModel` two-way data binding, we need to import the `FormsModule` - package in our Angular module. We add it to the `NgModule` decorator's `imports` array. This array contains the list - of external modules used by our application. -
Learn more about the `FormsModule` and `ngModel` in the - [Forms](../guide/forms.html#ngModel) chapter. ++ifDocsFor('ts|js') + .callout.is-important + header FormsModule is Required to use ngModel + :marked + Before we can use `ngModel` two-way data binding, we need to import the `FormsModule` + package in our Angular module. We add it to the `NgModule` decorator's `imports` array. This array contains the list + of external modules used by our application. +
Learn more about the `FormsModule` and `ngModel` in the + [Forms](../guide/forms.html#ngModel) chapter. -+makeExample('template-syntax/ts/app/app.module.1.ts', '', 'app.module.ts (FormsModule import)') + +makeExample('template-syntax/ts/app/app.module.1.ts', '', 'app.module.ts (FormsModule import)') :marked Alternatively to using `[(ngModel)]`, we can use the canonical prefix form: