Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
4 changes: 3 additions & 1 deletion public/docs/_examples/toh-1/dart/lib/app_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion public/docs/_examples/toh-1/dart/web/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion public/docs/dart/latest/tutorial/toh-pt1.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down