docs(toh-1/dart): minor edits (#1614)

- Fixed HTML.
- Removed unnecessary snippet since it is in the code.
- Copyedit (Hero Property) -> (Hero property).
This commit is contained in:
Patrice Chalin 2016-06-07 14:59:41 -07:00 committed by Kathy Walrath
parent f7cf6fde9f
commit afee8dbe7e
4 changed files with 6 additions and 8 deletions

View File

@ -25,7 +25,7 @@ template: '''
<div><label>id: </label>{{hero.id}}</div>
<div>
<label>name: </label>
<div><input value="{{hero.name}}" placeholder="name"></div>
<input value="{{hero.name}}" placeholder="name">
</div>'''
// #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

View File

@ -18,11 +18,13 @@ class Hero {
<div><label>id: </label>{{hero.id}}</div>
<div>
<label>name: </label>
<div><input [(ngModel)]="hero.name" placeholder="name"></div>
<input [(ngModel)]="hero.name" placeholder="name">
</div>'''
)
class AppComponent {
String title = 'Tour of Heroes';
// #docregion hero-property-1
Hero hero = new Hero(1, 'Windstorm');
// #enddocregion hero-property-1
}
// #enddocregion pt1

View File

@ -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

View File

@ -87,7 +87,7 @@ code-example(format="" language="bash").
Now that we have a `Hero` class, lets refactor our components `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,