docs(toh-1/ts): minor edits
closes #1615 - Fixed HTML. - Removed unnecessary snippet since it is in the code. - Copyedit: (Hero property) -> (hero property).
This commit is contained in:
parent
ce05f9b4f9
commit
2fc7e5ab50
|
@ -37,10 +37,3 @@ export class AppComponent {
|
|||
hero = 'Windstorm';
|
||||
}
|
||||
// #enddocregion app-component-1
|
||||
|
||||
// #docregion hero-property-1
|
||||
hero: Hero = {
|
||||
id: 1,
|
||||
name: 'Windstorm'
|
||||
};
|
||||
// #enddocregion hero-property-1
|
||||
|
|
|
@ -22,10 +22,11 @@ export class Hero {
|
|||
})
|
||||
export class AppComponent {
|
||||
title = 'Tour of Heroes';
|
||||
// #docregion hero-property-1
|
||||
hero: Hero = {
|
||||
id: 1,
|
||||
name: 'Windstorm'
|
||||
};
|
||||
// #enddocregion hero-property-1
|
||||
}
|
||||
|
||||
// #enddocregion pt1
|
||||
|
|
|
@ -78,7 +78,7 @@ code-example(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/ts-snippets/app.component.snippets.pt1.ts', 'hero-property-1', 'app.component.ts (Hero property)')(format=".")
|
||||
+makeExample('toh-1/ts/app/app.component.ts', 'hero-property-1', 'app.component.ts (hero property)')(format=".")
|
||||
|
||||
:marked
|
||||
Because we changed the hero from a string to an object,
|
||||
|
|
Loading…
Reference in New Issue