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

Commit afee8db

Browse files
chalinkwalrath
authored andcommitted
docs(toh-1/dart): minor edits (#1614)
- Fixed HTML. - Removed unnecessary snippet since it is in the code. - Copyedit (Hero Property) -> (Hero property).
1 parent f7cf6fd commit afee8db

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

public/docs/_examples/toh-1/dart-snippets/app_component_snippets_pt1.dart

+1-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ template: '''
2525
<div><label>id: </label>{{hero.id}}</div>
2626
<div>
2727
<label>name: </label>
28-
<div><input value="{{hero.name}}" placeholder="name"></div>
28+
<input value="{{hero.name}}" placeholder="name">
2929
</div>'''
3030
// #enddocregion editing-Hero
3131

@@ -35,7 +35,3 @@ class AppComponent {
3535
Hero hero = 'Windstorm';
3636
}
3737
// #enddocregion app-component-1
38-
39-
// #docregion hero-property-1
40-
Hero hero = new Hero(1, 'Windstorm');
41-
// #enddocregion hero-property-1

public/docs/_examples/toh-1/dart/lib/app_component.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ class Hero {
1818
<div><label>id: </label>{{hero.id}}</div>
1919
<div>
2020
<label>name: </label>
21-
<div><input [(ngModel)]="hero.name" placeholder="name"></div>
21+
<input [(ngModel)]="hero.name" placeholder="name">
2222
</div>'''
2323
)
2424
class AppComponent {
2525
String title = 'Tour of Heroes';
26+
// #docregion hero-property-1
2627
Hero hero = new Hero(1, 'Windstorm');
28+
// #enddocregion hero-property-1
2729
}
2830
// #enddocregion pt1

public/docs/_examples/toh-1/dart/web/main.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:angular2/platform/browser.dart';
33

44
import 'package:angular2_tour_of_heroes/app_component.dart';
55

6-
main() {
6+
void main() {
77
bootstrap(AppComponent);
88
}
99
// #enddocregion pt1

public/docs/dart/latest/tutorial/toh-pt1.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ code-example(format="" language="bash").
8787
Now that we have a `Hero` class, let’s refactor our component’s `hero` property to be of type `Hero`.
8888
Then initialize it with an id of `1` and the name, "Windstorm".
8989

90-
+makeExample('toh-1/dart-snippets/app_component_snippets_pt1.dart', 'hero-property-1', 'app_component.dart (Hero property)')(format=".")
90+
+makeExample('toh-1/dart/lib/app_component.dart', 'hero-property-1', 'app_component.dart (hero property)')(format=".")
9191

9292
:marked
9393
Because we changed the hero from a string to an object,

0 commit comments

Comments
 (0)