From ff20b559755675544cb3a97c173c98697bf9ae80 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Sat, 30 Apr 2016 07:01:16 -0700 Subject: [PATCH] chore(dart & ts): update to beta.17 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change `ngFor=“#…”` to `ngFor=“let…` in code. All are .dart files except for `app_component.html` which also has changes for: - ` to `` - `#docregion` tag name updates from var-foo to ref-foo. - Other misc updates to minimize diffs with TS version of file, whitespace differences were ignored. + Minor update to sync up Dart prose with TS prose. + Used https://github.com/angular/angular/wiki/Angular-2-Dart-Transformer#resol ved_identifiers to solve https://github.com/angular/angular.io/issues/1033 Guide/pipes not updated as it will be rolled back to beta.15 in PR #1220. --- .../_examples/architecture/dart/pubspec.yaml | 2 +- .../attribute-directives/dart/pubspec.yaml | 2 +- .../dart/lib/heroes/hero_list_component.dart | 2 +- .../lib/heroes/hero_list_component_1.dart | 2 +- .../lib/heroes/hero_list_component_2.dart | 2 +- .../dependency-injection/dart/pubspec.yaml | 2 +- .../dart/lib/app_component.dart | 2 +- .../dart/lib/app_component_2.dart | 2 +- .../dart/lib/app_component_3.dart | 2 +- .../displaying-data/dart/pubspec.yaml | 2 +- public/docs/_examples/forms/dart/pubspec.yaml | 2 +- .../dart/lib/heroes_list_component.dart | 2 +- .../dart/pubspec.yaml | 2 +- .../dart/lib/after_content_parent.dart | 2 +- .../dart/lib/after_view_component.dart | 2 +- .../dart/lib/counter_component.dart | 4 +- .../dart/lib/on_changes_component.dart | 2 +- .../dart/lib/peek_a_boo_parent_component.dart | 2 +- .../dart/lib/spy_component.dart | 4 +- .../lifecycle-hooks/dart/pubspec.yaml | 2 +- .../_examples/quickstart/dart/pubspec.yaml | 2 +- .../dart/lib/toh/hero_list_component.dart | 2 +- .../dart/lib/wiki/wiki_component.dart | 2 +- .../dart/lib/wiki/wiki_smart_component.dart | 2 +- .../server-communication/dart/pubspec.yaml | 4 +- .../structural-directives/dart/pubspec.yaml | 2 +- .../dart/lib/app_component.html | 31 +++++++-------- .../template-syntax/dart/pubspec.yaml | 2 +- public/docs/_examples/toh-1/dart/pubspec.yaml | 2 +- .../toh-2/dart/lib/app_component.dart | 2 +- public/docs/_examples/toh-2/dart/pubspec.yaml | 2 +- .../toh-3/dart/lib/app_component.dart | 2 +- public/docs/_examples/toh-3/dart/pubspec.yaml | 2 +- .../toh-4/dart/lib/app_component.dart | 2 +- .../toh-4/dart/lib/app_component_1.dart | 2 +- public/docs/_examples/toh-4/dart/pubspec.yaml | 2 +- public/docs/_examples/toh-5/dart/pubspec.yaml | 2 +- .../dart/lib/little_tour_component.dart | 2 +- .../_examples/user-input/dart/pubspec.yaml | 2 +- public/docs/dart/latest/_data.json | 2 +- .../dart/latest/guide/displaying-data.jade | 38 ++++++++----------- public/docs/dart/latest/guide/forms.jade | 34 ++++++++--------- .../dart/latest/guide/template-syntax.jade | 19 ++++------ public/docs/dart/latest/guide/user-input.jade | 13 +++---- public/docs/dart/latest/quickstart.jade | 2 +- public/docs/dart/latest/tutorial/toh-pt2.jade | 6 +-- .../dart/latest/tutorial/toh-pt5-NEW.jade | 2 +- .../cookbook/a1-a2-quick-reference.jade | 11 ++---- .../docs/ts/latest/guide/displaying-data.jade | 23 ++++++----- public/docs/ts/latest/guide/forms.jade | 12 +++--- .../docs/ts/latest/guide/template-syntax.jade | 7 ++-- 51 files changed, 133 insertions(+), 149 deletions(-) diff --git a/public/docs/_examples/architecture/dart/pubspec.yaml b/public/docs/_examples/architecture/dart/pubspec.yaml index 874433fc58..9418b2ec76 100644 --- a/public/docs/_examples/architecture/dart/pubspec.yaml +++ b/public/docs/_examples/architecture/dart/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/attribute-directives/dart/pubspec.yaml b/public/docs/_examples/attribute-directives/dart/pubspec.yaml index b8442185f4..0472ac2166 100644 --- a/public/docs/_examples/attribute-directives/dart/pubspec.yaml +++ b/public/docs/_examples/attribute-directives/dart/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component.dart b/public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component.dart index 0c79b2f600..96d541762d 100644 --- a/public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component.dart +++ b/public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component.dart @@ -7,7 +7,7 @@ import 'hero_service.dart'; @Component( selector: 'hero-list', template: ''' -
+
{{hero.id}} - {{hero.name}} ({{hero.isSecret ? 'secret' : 'public'}})
''') diff --git a/public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component_1.dart b/public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component_1.dart index 366cf570b0..4abee51561 100644 --- a/public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component_1.dart +++ b/public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component_1.dart @@ -7,7 +7,7 @@ import 'mock_heroes.dart'; @Component( selector: 'hero-list', template: ''' -
+
{{hero.id}} - {{hero.name}}
''') class HeroListComponent { diff --git a/public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component_2.dart b/public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component_2.dart index 637ca74b00..d120cfa892 100644 --- a/public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component_2.dart +++ b/public/docs/_examples/dependency-injection/dart/lib/heroes/hero_list_component_2.dart @@ -7,7 +7,7 @@ import 'hero_service.dart'; @Component( selector: 'hero-list', template: ''' -
+
{{hero.id}} - {{hero.name}}
''') class HeroListComponent { diff --git a/public/docs/_examples/dependency-injection/dart/pubspec.yaml b/public/docs/_examples/dependency-injection/dart/pubspec.yaml index 88051c514e..5a6661b0d1 100644 --- a/public/docs/_examples/dependency-injection/dart/pubspec.yaml +++ b/public/docs/_examples/dependency-injection/dart/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/displaying-data/dart/lib/app_component.dart b/public/docs/_examples/displaying-data/dart/lib/app_component.dart index a5c04369e7..25402e3e3b 100644 --- a/public/docs/_examples/displaying-data/dart/lib/app_component.dart +++ b/public/docs/_examples/displaying-data/dart/lib/app_component.dart @@ -17,7 +17,7 @@ final List _heroes = [

My favorite hero is: {{myHero.name}}

Heroes:

    -
  • +
  • {{ hero.name }}
diff --git a/public/docs/_examples/displaying-data/dart/lib/app_component_2.dart b/public/docs/_examples/displaying-data/dart/lib/app_component_2.dart index 52162e38e3..3d64fd0c02 100644 --- a/public/docs/_examples/displaying-data/dart/lib/app_component_2.dart +++ b/public/docs/_examples/displaying-data/dart/lib/app_component_2.dart @@ -19,7 +19,7 @@ const List _heroes = const [

Heroes:

    // #docregion li-repeater -
  • +
  • {{ hero }}
  • // #enddocregion li-repeater diff --git a/public/docs/_examples/displaying-data/dart/lib/app_component_3.dart b/public/docs/_examples/displaying-data/dart/lib/app_component_3.dart index 69f424d797..51d2827a2a 100644 --- a/public/docs/_examples/displaying-data/dart/lib/app_component_3.dart +++ b/public/docs/_examples/displaying-data/dart/lib/app_component_3.dart @@ -19,7 +19,7 @@ final List _heroes = [

    My favorite hero is: {{myHero.name}}

    Heroes:

      -
    • +
    • {{ hero.name }}
    ''' diff --git a/public/docs/_examples/displaying-data/dart/pubspec.yaml b/public/docs/_examples/displaying-data/dart/pubspec.yaml index c8d24433b0..f01749b0ac 100644 --- a/public/docs/_examples/displaying-data/dart/pubspec.yaml +++ b/public/docs/_examples/displaying-data/dart/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/forms/dart/pubspec.yaml b/public/docs/_examples/forms/dart/pubspec.yaml index 50f0695524..6c350a3657 100644 --- a/public/docs/_examples/forms/dart/pubspec.yaml +++ b/public/docs/_examples/forms/dart/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/hierarchical-dependency-injection/dart/lib/heroes_list_component.dart b/public/docs/_examples/hierarchical-dependency-injection/dart/lib/heroes_list_component.dart index c484b2091d..2810e1cdb4 100644 --- a/public/docs/_examples/hierarchical-dependency-injection/dart/lib/heroes_list_component.dart +++ b/public/docs/_examples/hierarchical-dependency-injection/dart/lib/heroes_list_component.dart @@ -12,7 +12,7 @@ import 'heroes_service.dart'; template: '''
      -
    • +
    • diff --git a/public/docs/_examples/hierarchical-dependency-injection/dart/pubspec.yaml b/public/docs/_examples/hierarchical-dependency-injection/dart/pubspec.yaml index 0abb1e29bd..7f4fcce629 100644 --- a/public/docs/_examples/hierarchical-dependency-injection/dart/pubspec.yaml +++ b/public/docs/_examples/hierarchical-dependency-injection/dart/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/lifecycle-hooks/dart/lib/after_content_parent.dart b/public/docs/_examples/lifecycle-hooks/dart/lib/after_content_parent.dart index a753d5f76a..64cad0a49c 100644 --- a/public/docs/_examples/lifecycle-hooks/dart/lib/after_content_parent.dart +++ b/public/docs/_examples/lifecycle-hooks/dart/lib/after_content_parent.dart @@ -76,7 +76,7 @@ class AfterContentComponent

      -- Lifecycle Hook Log --

      -
      {{msg}}
      +
      {{msg}}
    ''', styles: const [ diff --git a/public/docs/_examples/lifecycle-hooks/dart/lib/after_view_component.dart b/public/docs/_examples/lifecycle-hooks/dart/lib/after_view_component.dart index c4274febf5..9fa67a74f0 100644 --- a/public/docs/_examples/lifecycle-hooks/dart/lib/after_view_component.dart +++ b/public/docs/_examples/lifecycle-hooks/dart/lib/after_view_component.dart @@ -18,7 +18,7 @@ import 'logger_service.dart';

-- Lifecycle Hook Log --

-
{{msg}}
+
{{msg}}
''', styles: const [ diff --git a/public/docs/_examples/lifecycle-hooks/dart/lib/counter_component.dart b/public/docs/_examples/lifecycle-hooks/dart/lib/counter_component.dart index e338fe4a79..3113e65392 100644 --- a/public/docs/_examples/lifecycle-hooks/dart/lib/counter_component.dart +++ b/public/docs/_examples/lifecycle-hooks/dart/lib/counter_component.dart @@ -11,7 +11,7 @@ import 'spy_directive.dart'; Counter = {{counter}}
-- Counter Change Log --
-
{{chg}}
+
{{chg}}
''', styles: const [ @@ -49,7 +49,7 @@ class MyCounter implements OnChanges {

-- Spy Lifecycle Hook Log --

-
{{msg}}
+
{{msg}}
''', styles: const [ diff --git a/public/docs/_examples/lifecycle-hooks/dart/lib/on_changes_component.dart b/public/docs/_examples/lifecycle-hooks/dart/lib/on_changes_component.dart index 45461a6019..d133e89a9c 100644 --- a/public/docs/_examples/lifecycle-hooks/dart/lib/on_changes_component.dart +++ b/public/docs/_examples/lifecycle-hooks/dart/lib/on_changes_component.dart @@ -17,7 +17,7 @@ class Hero {

{{hero.name}} can {{power}}

-- Change Log --

-
{{chg}}
+
{{chg}}
''', styles: const [ diff --git a/public/docs/_examples/lifecycle-hooks/dart/lib/peek_a_boo_parent_component.dart b/public/docs/_examples/lifecycle-hooks/dart/lib/peek_a_boo_parent_component.dart index 9c06142a3c..047ab3b439 100644 --- a/public/docs/_examples/lifecycle-hooks/dart/lib/peek_a_boo_parent_component.dart +++ b/public/docs/_examples/lifecycle-hooks/dart/lib/peek_a_boo_parent_component.dart @@ -19,7 +19,7 @@ import 'peek_a_boo_component.dart';

-- Lifecycle Hook Log --

-
{{msg}}
+
{{msg}}
''', styles: const [ diff --git a/public/docs/_examples/lifecycle-hooks/dart/lib/spy_component.dart b/public/docs/_examples/lifecycle-hooks/dart/lib/spy_component.dart index 1e9cfa8a26..f22793d8b6 100644 --- a/public/docs/_examples/lifecycle-hooks/dart/lib/spy_component.dart +++ b/public/docs/_examples/lifecycle-hooks/dart/lib/spy_component.dart @@ -15,12 +15,12 @@ import 'spy_directive.dart';

-
+
{{hero}}

-- Spy Lifecycle Hook Log --

-
{{msg}}
+
{{msg}}
''', styles: const [ diff --git a/public/docs/_examples/lifecycle-hooks/dart/pubspec.yaml b/public/docs/_examples/lifecycle-hooks/dart/pubspec.yaml index adef012f2e..a1e6f25956 100644 --- a/public/docs/_examples/lifecycle-hooks/dart/pubspec.yaml +++ b/public/docs/_examples/lifecycle-hooks/dart/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/quickstart/dart/pubspec.yaml b/public/docs/_examples/quickstart/dart/pubspec.yaml index 6d4ab0ae19..1144889e3d 100644 --- a/public/docs/_examples/quickstart/dart/pubspec.yaml +++ b/public/docs/_examples/quickstart/dart/pubspec.yaml @@ -7,7 +7,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 # #enddocregion no-rewriter dart_to_js_script_rewriter: ^1.0.1 diff --git a/public/docs/_examples/server-communication/dart/lib/toh/hero_list_component.dart b/public/docs/_examples/server-communication/dart/lib/toh/hero_list_component.dart index 89b8714a39..d812280943 100644 --- a/public/docs/_examples/server-communication/dart/lib/toh/hero_list_component.dart +++ b/public/docs/_examples/server-communication/dart/lib/toh/hero_list_component.dart @@ -12,7 +12,7 @@ import 'hero_service.dart'; template: '''

Heroes:

diff --git a/public/docs/_examples/server-communication/dart/lib/wiki/wiki_component.dart b/public/docs/_examples/server-communication/dart/lib/wiki/wiki_component.dart index dce151e834..f8856b25cf 100644 --- a/public/docs/_examples/server-communication/dart/lib/wiki/wiki_component.dart +++ b/public/docs/_examples/server-communication/dart/lib/wiki/wiki_component.dart @@ -12,7 +12,7 @@ import 'wikipedia_service.dart';

Fetches after each keystroke

''', providers: const [WikipediaService]) diff --git a/public/docs/_examples/server-communication/dart/lib/wiki/wiki_smart_component.dart b/public/docs/_examples/server-communication/dart/lib/wiki/wiki_smart_component.dart index 6f8934b2f3..70f5f7bfe3 100644 --- a/public/docs/_examples/server-communication/dart/lib/wiki/wiki_smart_component.dart +++ b/public/docs/_examples/server-communication/dart/lib/wiki/wiki_smart_component.dart @@ -12,7 +12,7 @@ import 'wikipedia_service.dart'; ''', providers: const [WikipediaService]) diff --git a/public/docs/_examples/server-communication/dart/pubspec.yaml b/public/docs/_examples/server-communication/dart/pubspec.yaml index 75c24fb92a..7d36077d67 100644 --- a/public/docs/_examples/server-communication/dart/pubspec.yaml +++ b/public/docs/_examples/server-communication/dart/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.6 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 http: ^0.11.3+3 @@ -17,4 +17,6 @@ transformers: platform_directives: 'package:angular2/common.dart#CORE_DIRECTIVES' platform_pipes: 'package:angular2/common.dart#COMMON_PIPES' entry_points: 'web/main.dart' + resolved_identifiers: + BrowserClient: 'package:http/browser_client.dart' - dart_to_js_script_rewriter diff --git a/public/docs/_examples/structural-directives/dart/pubspec.yaml b/public/docs/_examples/structural-directives/dart/pubspec.yaml index 796fd85a9b..70e2e63855 100644 --- a/public/docs/_examples/structural-directives/dart/pubspec.yaml +++ b/public/docs/_examples/structural-directives/dart/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: 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 5b97e1c1a9..0400832633 100644 --- a/public/docs/_examples/template-syntax/dart/lib/app_component.html +++ b/public/docs/_examples/template-syntax/dart/lib/app_component.html @@ -410,7 +410,7 @@ bindon-ngModel top -

NgStyle Binding

+

NgStyle Binding

@@ -633,12 +633,11 @@ bindon-ngModel

expand to template = "..."

- +
-

expand to <template>

@@ -655,31 +654,31 @@ bindon-ngModel

Template local variables

- + - + - +

Example Form

- - + +
- +
-
- +
- - + +

@@ -783,16 +782,18 @@ The null hero's name is {{nullHero.firstName}}
+top + -

The current color number is {{color}}

top --->

My First Angular Application

diff --git a/public/docs/_examples/template-syntax/dart/pubspec.yaml b/public/docs/_examples/template-syntax/dart/pubspec.yaml index 10fe491e9f..bc7f1fc9bb 100644 --- a/public/docs/_examples/template-syntax/dart/pubspec.yaml +++ b/public/docs/_examples/template-syntax/dart/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/toh-1/dart/pubspec.yaml b/public/docs/_examples/toh-1/dart/pubspec.yaml index 1a367b506c..8b71851f9a 100644 --- a/public/docs/_examples/toh-1/dart/pubspec.yaml +++ b/public/docs/_examples/toh-1/dart/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/toh-2/dart/lib/app_component.dart b/public/docs/_examples/toh-2/dart/lib/app_component.dart index 53b534489b..b33aa28b4d 100644 --- a/public/docs/_examples/toh-2/dart/lib/app_component.dart +++ b/public/docs/_examples/toh-2/dart/lib/app_component.dart @@ -14,7 +14,7 @@ class Hero {

{{title}}

My Heroes

    -
  • {{hero.id}} {{hero.name}} diff --git a/public/docs/_examples/toh-2/dart/pubspec.yaml b/public/docs/_examples/toh-2/dart/pubspec.yaml index da349a8725..14e92eff11 100644 --- a/public/docs/_examples/toh-2/dart/pubspec.yaml +++ b/public/docs/_examples/toh-2/dart/pubspec.yaml @@ -3,7 +3,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/toh-3/dart/lib/app_component.dart b/public/docs/_examples/toh-3/dart/lib/app_component.dart index 4fa0fceecb..e4296ec7d5 100644 --- a/public/docs/_examples/toh-3/dart/lib/app_component.dart +++ b/public/docs/_examples/toh-3/dart/lib/app_component.dart @@ -15,7 +15,7 @@ import 'hero_detail_component.dart';

    {{title}}

    My Heroes

      -
    • {{hero.id}} {{hero.name}} diff --git a/public/docs/_examples/toh-3/dart/pubspec.yaml b/public/docs/_examples/toh-3/dart/pubspec.yaml index da349a8725..14e92eff11 100644 --- a/public/docs/_examples/toh-3/dart/pubspec.yaml +++ b/public/docs/_examples/toh-3/dart/pubspec.yaml @@ -3,7 +3,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/toh-4/dart/lib/app_component.dart b/public/docs/_examples/toh-4/dart/lib/app_component.dart index 745d183d11..145030d300 100644 --- a/public/docs/_examples/toh-4/dart/lib/app_component.dart +++ b/public/docs/_examples/toh-4/dart/lib/app_component.dart @@ -17,7 +17,7 @@ import 'hero_service.dart';

      {{title}}

      My Heroes

        -
      • {{hero.id}} {{hero.name}} diff --git a/public/docs/_examples/toh-4/dart/lib/app_component_1.dart b/public/docs/_examples/toh-4/dart/lib/app_component_1.dart index 2f2cbb0dd0..7f23cf89fd 100644 --- a/public/docs/_examples/toh-4/dart/lib/app_component_1.dart +++ b/public/docs/_examples/toh-4/dart/lib/app_component_1.dart @@ -13,7 +13,7 @@ import 'hero_service_1.dart'; @Component( selector: 'my-app', template: ''' -
        +
        {{hero.name}}
        diff --git a/public/docs/_examples/toh-4/dart/pubspec.yaml b/public/docs/_examples/toh-4/dart/pubspec.yaml index da349a8725..14e92eff11 100644 --- a/public/docs/_examples/toh-4/dart/pubspec.yaml +++ b/public/docs/_examples/toh-4/dart/pubspec.yaml @@ -3,7 +3,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/toh-5/dart/pubspec.yaml b/public/docs/_examples/toh-5/dart/pubspec.yaml index b4df7a6b99..1cc1f689e9 100644 --- a/public/docs/_examples/toh-5/dart/pubspec.yaml +++ b/public/docs/_examples/toh-5/dart/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/_examples/user-input/dart/lib/little_tour_component.dart b/public/docs/_examples/user-input/dart/lib/little_tour_component.dart index 581689a85e..4e8f066a0a 100644 --- a/public/docs/_examples/user-input/dart/lib/little_tour_component.dart +++ b/public/docs/_examples/user-input/dart/lib/little_tour_component.dart @@ -11,7 +11,7 @@ import 'package:angular2/core.dart'; -
        • {{hero}}
        +
        • {{hero}}
        ''') class LittleTourComponent { List heroes = ['Windstorm', 'Bombasto', 'Magneta', 'Tornado']; diff --git a/public/docs/_examples/user-input/dart/pubspec.yaml b/public/docs/_examples/user-input/dart/pubspec.yaml index 7f4fd9f312..6c18ff599b 100644 --- a/public/docs/_examples/user-input/dart/pubspec.yaml +++ b/public/docs/_examples/user-input/dart/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: '>=1.13.0 <2.0.0' dependencies: - angular2: 2.0.0-beta.16 + angular2: 2.0.0-beta.17 browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: diff --git a/public/docs/dart/latest/_data.json b/public/docs/dart/latest/_data.json index 4ff984ba64..861e707ff1 100644 --- a/public/docs/dart/latest/_data.json +++ b/public/docs/dart/latest/_data.json @@ -3,7 +3,7 @@ "icon": "home", "title": "Angular Docs", "menuTitle": "Docs Home", - "banner": "Welcome to angular.io/dart! The current Angular 2 release is beta.16. Consult the Change Log about recent enhancements, fixes, and breaking changes." + "banner": "Welcome to angular.io/dart! The current Angular 2 release is beta.17. Consult the Change Log about recent enhancements, fixes, and breaking changes." }, "quickstart": { diff --git a/public/docs/dart/latest/guide/displaying-data.jade b/public/docs/dart/latest/guide/displaying-data.jade index 784cc2ef70..6e8b96f3c3 100644 --- a/public/docs/dart/latest/guide/displaying-data.jade +++ b/public/docs/dart/latest/guide/displaying-data.jade @@ -39,7 +39,7 @@ figure.image-display and the imports in `main.dart`. In `pubspec.yaml`, the `platform_directives` entry lets us use - core directives, such as the NgFor directive that we'll soon add to our app. + core directives, such as the `ngFor` directive that we'll soon add to our app. In `main.dart`, importing `app_component.dart` lets us implement part of the app in a different Dart file. The QuickStart version of `main.dart` @@ -114,13 +114,13 @@ figure.image-display .l-main-section :marked - ## Showing a list property with NgFor + ## Showing a list property with ***ngFor** We want to display a list of heroes. We begin by adding a list of hero names to the component and redefine `myHero` to be the first name in the list. +makeExample('displaying-data/dart/lib/app_component_2.dart', 'mock-heroes', 'lib/app_component.dart (excerpt)')(format=".") :marked - Now we use the Angular `NgFor` "repeater" directive in the template to display + Now we use the Angular `ngFor` "repeater" directive in the template to display each item in the `heroes` list. +makeExample('displaying-data/dart/lib/app_component_2.dart', 'template','lib/app_component.dart (excerpt)')(format=".") @@ -137,15 +137,12 @@ figure.image-display .alert.is-important :marked - Don't forget the leading asterisk (\*) in `*ngFor`. - + Don't forget the leading asterisk (\*) in `*ngFor`. It is an essential part of the syntax. + Learn more about this and `ngFor` in the [Template Syntax](./template-syntax.html#ngFor) chapter. :marked - Notice the `#hero` in the `NgFor` double-quoted instruction. - The `#hero` is a local template variable - - declaration. - The `#` prefix declares a local variable name named `hero`. + Notice the `hero` in the `ngFor` double-quoted instruction; + it is an example of a [template input variable](./template-syntax.html#ngForMicrosyntax). Angular duplicates the `
      • ` for each item in the list, setting the `hero` variable to the item (the hero) in the current iteration. Angular uses that variable as the @@ -153,8 +150,8 @@ figure.image-display .l-sub-section :marked - We happened to give `NgFor` a list to display. - In fact, `NgFor` can repeat items for any [Iterable](https://api.dartlang.org/stable/dart-core/Iterable-class.html) object. + We happened to give `ngFor` a list to display. + In fact, `ngFor` can repeat items for any [Iterable](https://api.dartlang.org/stable/dart-core/Iterable-class.html) object. :marked Now the heroes appear in an unordered list. @@ -215,19 +212,17 @@ figure.image-display In our example, we'd like to display a message if we have a large number of heroes — say, more than 3. - The Angular `NgIf` directive inserts or removes an element based on a boolean condition. + The Angular `ngIf` directive inserts or removes an element based on a boolean condition. We can see it in action by adding the following paragraph at the bottom of the template: +makeExample('displaying-data/dart/lib/app_component.dart', 'message') .alert.is-important :marked - Don't forget the leading asterisk (\*) in `*ngIf`. - - + Don't forget the leading asterisk (\*) in `*ngIf`. It is an essential part of the syntax. + Learn more about this and `ngIf` in the [Template Syntax](./template-syntax.html#ngIf) chapter. :marked - The template expression - - inside the double quotes looks much like Dart, and it _is_ much like Dart. + The [template expression](./template-syntax.html#template-expressions) inside the double quotes + looks much like Dart, and it _is_ much like Dart. When the component's list of heroes has more than 3 items, Angular adds the paragraph to the DOM and the message appears. If there are 3 or fewer items, Angular omits the paragraph, so no message appears. @@ -247,10 +242,9 @@ figure.image-display ## Summary Now we know how to use: - **interpolation** with double curly braces to display a component property - - **`NgFor`** to display a list of items + - **`ngFor`** to display a list of items - a Dart class to shape the **model data** for our component and display properties of that model - - **`NgIf`** to conditionally display a chunk of HTML based on a boolean expression - + - **`ngIf`** to conditionally display a chunk of HTML based on a boolean expression Here's our final code: diff --git a/public/docs/dart/latest/guide/forms.jade b/public/docs/dart/latest/guide/forms.jade index 62ebeddaa6..e78d9c19eb 100644 --- a/public/docs/dart/latest/guide/forms.jade +++ b/public/docs/dart/latest/guide/forms.jade @@ -28,7 +28,7 @@ include ../_util-fns - How to display validation errors to users and enable/disable form controls - - How to share information across controls with template local variables + - How to share information across controls with template reference variables .l-main-section :marked @@ -246,7 +246,7 @@ figure.image-display We maintain that list internally (in `HeroFormComponent`). We'll add a `select` to our - form and bind the options to the `powers` list using `NgFor`, + form and bind the options to the `powers` list using `ngFor`, a technique used before in [Displaying Data](./displaying-data.html). Add the following HTML *immediately below* the Alter Ego group. @@ -254,7 +254,7 @@ figure.image-display :marked This code repeats the `
      • ` element’s `click` event as the target. The expression to the right of the equal sign calls the `AppComponent` method, `onSelect()`, - passing the local template variable `hero` as an argument. + passing the template input variable `hero` as an argument. That’s the same `hero` variable we defined previously in the `ngFor`. .l-sub-section :marked diff --git a/public/docs/dart/latest/tutorial/toh-pt5-NEW.jade b/public/docs/dart/latest/tutorial/toh-pt5-NEW.jade index 95c2994d3b..7c8a0565f7 100644 --- a/public/docs/dart/latest/tutorial/toh-pt5-NEW.jade +++ b/public/docs/dart/latest/tutorial/toh-pt5-NEW.jade @@ -140,7 +140,7 @@ code-example(format="." language="bash"). // Our Tour of Heroes needs routing, // so we load the library in the `index.html` in a script tag immediately *after* the angular script itself. -//+makeExample('toh-5/dart/web/index.html', 'router', 'index.html (router)')(format=".") +//makeExample('toh-5/dart/web/index.html', 'router', 'index.html (router)')(format=".") :marked While we're in `index.html`, we add `` at the top of the `` section. +makeExample('toh-5/dart/web/index.html', 'base-href', 'index.html (base href)')(format=".") diff --git a/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade b/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade index 6976f95af4..8e95211b50 100644 --- a/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade +++ b/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade @@ -94,15 +94,12 @@ table(width="100%") Here, `movie` is a user-defined local variable. td :marked - ### Local variables + ### Input variables +makeExample('cb-a1-a2-quick-reference/ts/app/app.component.html', 'local')(format="." ) :marked - In Angular 2, we have true template reference variables that are explicitly defined using the hash (#) symbol. + In Angular 2, we have true template input variables that are explicitly defined using the `let` keyword. - Using a template reference variable, we can move data between elements in the template. We can use the template reference - variable on the same element, on sibling elements, or on any child elements. - - For more information see [Template Syntax](../guide/template-syntax.html#ref-vars). + For more information see [ngFor micro-syntax](../guide/template-syntax.html#ngForMicrosyntax). :marked [Back to top](#top) @@ -339,7 +336,7 @@ table(width="100%") Notice the other syntax differences: The (*) before `ngFor` is required; - the (#) identifies `movie` as a local variable; + the `let` keyword identifies `movie` as an input variable; the list preposition is `of`, not `in`. For more information see [Structural Directives](../guide/structural-directives.html). diff --git a/public/docs/ts/latest/guide/displaying-data.jade b/public/docs/ts/latest/guide/displaying-data.jade index b5ce5966a9..a8e1a5daf8 100644 --- a/public/docs/ts/latest/guide/displaying-data.jade +++ b/public/docs/ts/latest/guide/displaying-data.jade @@ -116,14 +116,14 @@ figure.image-display .l-main-section :marked - ## Showing an array property with NgFor + ## Showing an array property with ***ngFor** We want to display a list of heroes. We begin by adding a mock heroes name array to the component, just above `myHero`, and redefine `myHero` to be the first name in the array. +makeExample('displaying-data/ts/app/app.component.2.ts', 'mock-heroes', 'app/app.component.ts (class)')(format=".") :marked - Now we use the Angular `NgFor` "repeater" directive in the template to display + Now we use the Angular `ngFor` "repeater" directive in the template to display each item in the `heroes` list. +makeExample('displaying-data/ts/app/app.component.2.ts', 'template','app/app.component.ts (template)')(format=".") @@ -143,9 +143,8 @@ figure.image-display Learn more about this and `ngFor` in the [Template Syntax](./template-syntax.html#ngFor) chapter. :marked - Notice the `#hero` in the `ngFor` double-quoted instruction. - The `#hero` is a [template input variable](./template-syntax.html#ngForMicrosyntax) declaration. - The `let` keyword declares a local variable name named `hero`. + Notice the `hero` in the `ngFor` double-quoted instruction; + it is an example of a [template input variable](./template-syntax.html#ngForMicrosyntax). Angular duplicates the `
      • ` for each item in the list, setting the `hero` variable to the item (the hero) in the current iteration. Angular uses that variable as the @@ -153,8 +152,8 @@ figure.image-display .l-sub-section :marked - We happened to give `NgFor` an array to display. - In fact, `NgFor` can repeat items for any [iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) + We happened to give `ngFor` an array to display. + In fact, `ngFor` can repeat items for any [iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) object. :marked Assuming we're still running under the `npm start` command, @@ -219,13 +218,13 @@ figure.image-display In our example, we'd like to display a message if we have a large number of heroes — say, more than 3. - The Angular `NgIf` directive inserts or removes an element based on a truthy/falsey condition. + The Angular `ngIf` directive inserts or removes an element based on a truthy/falsey condition. We can see it in action by adding the following paragraph at the bottom of the template: +makeExample('displaying-data/ts/app/app.component.ts', 'message') .alert.is-important :marked Don't forget the leading asterisk (\*) in `*ngIf`. It is an essential part of the syntax. - Learn more about this and `NgIf` in the [Template Syntax](./template-syntax.html#ngIf) chapter. + Learn more about this and `ngIf` in the [Template Syntax](./template-syntax.html#ngIf) chapter. :marked The [template expression](./template-syntax.html#template-expressions) inside the double quotes @@ -236,7 +235,7 @@ figure.image-display .alert.is-helpful :marked Angular isn't showing and hiding the message. It is adding and removing the paragraph element from the DOM. - That hardly matters here. It would matter a great deal from a performance perspective if + That hardly matters here. But it would matter a great deal, from a performance perspective, if we were conditionally including or excluding a big chunk of HTML with many data bindings. :marked @@ -249,9 +248,9 @@ figure.image-display ## Summary Now we know how to use: - **interpolation** with double curly braces to display a component property - - **`NgFor`** to display a list of items + - **`ngFor`** to display a list of items - a TypeScript class to shape the **model data** for our component and display properties of that model - - **`NgIf`** to conditionally display a chunk of HTML based on a boolean expression + - **`ngIf`** to conditionally display a chunk of HTML based on a boolean expression Here's our final code: diff --git a/public/docs/ts/latest/guide/forms.jade b/public/docs/ts/latest/guide/forms.jade index 8c8834e863..d4850340e5 100644 --- a/public/docs/ts/latest/guide/forms.jade +++ b/public/docs/ts/latest/guide/forms.jade @@ -27,7 +27,7 @@ include ../_util-fns - displaying validation errors to users and enable/disable form controls - - sharing information among controls with template local variables + - sharing information among controls with template reference variables [Live Example](/resources/live-examples/forms/ts/plnkr.html) .l-main-section @@ -228,7 +228,7 @@ ol We maintain that list internally (in `HeroFormComponent`). We'll add a `select` to our - form and bind the options to the `powers` list using `NgFor`, + form and bind the options to the `powers` list using `ngFor`, a technique we might have seen before in the [Displaying Data](./displaying-data.html) chapter. Add the following HTML *immediately below* the *Alter Ego* group. @@ -478,7 +478,7 @@ figure.image-display :marked Why "ngForm"? A directive's [exportAs](../api/core/DirectiveMetadata-class.html#!#exportAs) property - tells Angular how to link local variable to the directive. + tells Angular how to link the reference variable to the directive. We set `name` to `ngForm` because the `NgControlName` directive's `exportAs` property happens to be "ngForm". This seems unintuitive at first until we realize that *all* control directives in the @@ -576,7 +576,7 @@ figure.image-display :marked We slipped in something extra there at the end! We defined a - template local variable, **`#heroForm`**, and initialized it with the value, "ngForm". + template reference variable, **`#heroForm`**, and initialized it with the value, "ngForm". The variable `heroForm` is now a reference to the `NgForm` directive that governs the form as a whole. @@ -666,10 +666,10 @@ figure.image-display - An Angular HTML form template. - A form component class with a `Component` decorator. - The `ngSubmit` directive for handling the form submission. - - Template local variables such as `#heroForm`, `#name`, `#alter-ego` and `#power`. + - Template reference variables such as `#heroForm`, `#name`, `#alter-ego` and `#power`. - The `[(ngModel)]` syntax for two-way data binding. - The `ngControlName` directive for validation and form element change tracking. - - The local variable’s `valid` property on input controls to check if a control is valid and show/hide error messages. + - The reference variable’s `valid` property on input controls to check if a control is valid and show/hide error messages. - Controlling the submit button's enabled state by binding to `NgForm` validity. - Custom CSS classes that provide visual feedback to users about invalid controls. diff --git a/public/docs/ts/latest/guide/template-syntax.jade b/public/docs/ts/latest/guide/template-syntax.jade index 4dd3130378..8933106cb7 100644 --- a/public/docs/ts/latest/guide/template-syntax.jade +++ b/public/docs/ts/latest/guide/template-syntax.jade @@ -1367,17 +1367,16 @@ figure.image-display Using the `*ngFor` syntax is much easier than writing out this expanded HTML ourselves. // #enddocregion star-template-ngFor-4 -// #docregion ref-vars-1 +// #docregion ref-vars .l-main-section :marked ## Template reference variables - A **Template reference variable** is a reference to an DOM element or directive within a template. + A **template reference variable** is a reference to an DOM element or directive within a template. It can be used with native DOM elements but also with Angular 2 components - in fact, it will work with any custom web component. -// #docregion ref-vars-refs :marked ### Referencing a template reference variable @@ -1385,7 +1384,7 @@ figure.image-display any child elements. Here are two other examples of creating and consuming a Template reference variable: -// #enddocregion ref-vars-refs +// #enddocregion ref-vars +makeExample('template-syntax/ts/app/app.component.html', 'ref-phone')(format=".") // #docregion ref-vars-value :marked