From cdf2a5f918b2c6dfc069520bdcaf1952ac18fe39 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Tue, 16 Aug 2016 05:43:29 -0700 Subject: [PATCH 1/2] template-syntax: update cache copy from latest --- public/docs/ts/_cache/guide/template-syntax.jade | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/public/docs/ts/_cache/guide/template-syntax.jade b/public/docs/ts/_cache/guide/template-syntax.jade index 3e0fb06ce8..9cf213cb1d 100644 --- a/public/docs/ts/_cache/guide/template-syntax.jade +++ b/public/docs/ts/_cache/guide/template-syntax.jade @@ -858,8 +858,20 @@ 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*. + +.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. From e46447d5b5bb6cde99b0ff200e4242a57e155bb1 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Tue, 16 Aug 2016 05:58:55 -0700 Subject: [PATCH 2/2] docs(template-syntax): post-RC5 Dart resync Contributes to #2077. Suites passed: - public/docs/_examples/template-syntax/dart - public/docs/_examples/template-syntax/ts --- .../dart/lib/app_component.dart | 5 +++++ .../dart/lib/app_component.html | 13 +++++++++---- .../docs/ts/_cache/guide/template-syntax.jade | 19 ++++++++++--------- .../docs/ts/latest/guide/template-syntax.jade | 19 ++++++++++--------- 4 files changed, 34 insertions(+), 22 deletions(-) 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 9cf213cb1d..9cc8fcdec3 100644 --- a/public/docs/ts/_cache/guide/template-syntax.jade +++ b/public/docs/ts/_cache/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: 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: