From afee8dbe7efcfad705da1af0700b14cfb7615c6d Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Tue, 7 Jun 2016 14:59:41 -0700 Subject: [PATCH] docs(toh-1/dart): minor edits (#1614) - Fixed HTML. - Removed unnecessary snippet since it is in the code. - Copyedit (Hero Property) -> (Hero property). --- .../toh-1/dart-snippets/app_component_snippets_pt1.dart | 6 +----- public/docs/_examples/toh-1/dart/lib/app_component.dart | 4 +++- public/docs/_examples/toh-1/dart/web/main.dart | 2 +- public/docs/dart/latest/tutorial/toh-pt1.jade | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/public/docs/_examples/toh-1/dart-snippets/app_component_snippets_pt1.dart b/public/docs/_examples/toh-1/dart-snippets/app_component_snippets_pt1.dart index b3a4e60eaf..8b21290440 100644 --- a/public/docs/_examples/toh-1/dart-snippets/app_component_snippets_pt1.dart +++ b/public/docs/_examples/toh-1/dart-snippets/app_component_snippets_pt1.dart @@ -25,7 +25,7 @@ template: '''
{{hero.id}}
-
+
''' // #enddocregion editing-Hero @@ -35,7 +35,3 @@ class AppComponent { Hero hero = 'Windstorm'; } // #enddocregion app-component-1 - -// #docregion hero-property-1 -Hero hero = new Hero(1, 'Windstorm'); -// #enddocregion hero-property-1 diff --git a/public/docs/_examples/toh-1/dart/lib/app_component.dart b/public/docs/_examples/toh-1/dart/lib/app_component.dart index 7fa504adbf..362d8b3004 100644 --- a/public/docs/_examples/toh-1/dart/lib/app_component.dart +++ b/public/docs/_examples/toh-1/dart/lib/app_component.dart @@ -18,11 +18,13 @@ class Hero {
{{hero.id}}
-
+
''' ) class AppComponent { String title = 'Tour of Heroes'; + // #docregion hero-property-1 Hero hero = new Hero(1, 'Windstorm'); + // #enddocregion hero-property-1 } // #enddocregion pt1 diff --git a/public/docs/_examples/toh-1/dart/web/main.dart b/public/docs/_examples/toh-1/dart/web/main.dart index 81c22cd91d..dbf48b9c70 100644 --- a/public/docs/_examples/toh-1/dart/web/main.dart +++ b/public/docs/_examples/toh-1/dart/web/main.dart @@ -3,7 +3,7 @@ import 'package:angular2/platform/browser.dart'; import 'package:angular2_tour_of_heroes/app_component.dart'; -main() { +void main() { bootstrap(AppComponent); } // #enddocregion pt1 diff --git a/public/docs/dart/latest/tutorial/toh-pt1.jade b/public/docs/dart/latest/tutorial/toh-pt1.jade index e96613a628..cb6d389286 100644 --- a/public/docs/dart/latest/tutorial/toh-pt1.jade +++ b/public/docs/dart/latest/tutorial/toh-pt1.jade @@ -87,7 +87,7 @@ code-example(format="" language="bash"). Now that we have a `Hero` class, let’s refactor our component’s `hero` property to be of type `Hero`. Then initialize it with an id of `1` and the name, "Windstorm". -+makeExample('toh-1/dart-snippets/app_component_snippets_pt1.dart', 'hero-property-1', 'app_component.dart (Hero property)')(format=".") ++makeExample('toh-1/dart/lib/app_component.dart', 'hero-property-1', 'app_component.dart (hero property)')(format=".") :marked Because we changed the hero from a string to an object,