From ebcd59ae4f43ab33d61622d0f26a0bae864d5b12 Mon Sep 17 00:00:00 2001 From: ajitsinghkaler Date: Sat, 7 Dec 2019 19:50:31 +0530 Subject: [PATCH] docs: replace from class hero to interface with accordance with # 344022 (#34294) Fixes #21186 PR Close #34294 --- aio/content/examples/property-binding/src/app/item.ts | 2 +- aio/content/tutorial/toh-pt1.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aio/content/examples/property-binding/src/app/item.ts b/aio/content/examples/property-binding/src/app/item.ts index 53bcca4514..442f22b900 100644 --- a/aio/content/examples/property-binding/src/app/item.ts +++ b/aio/content/examples/property-binding/src/app/item.ts @@ -1,5 +1,5 @@ // #docregion item-class -export class Item { +export interface Item { id: number; name: string; } diff --git a/aio/content/tutorial/toh-pt1.md b/aio/content/tutorial/toh-pt1.md index 65d5092a49..9d250dd7ad 100644 --- a/aio/content/tutorial/toh-pt1.md +++ b/aio/content/tutorial/toh-pt1.md @@ -67,17 +67,17 @@ So add an `` element to the `AppComponent` template file, just below Assuming that the CLI `ng serve` command is still running, the browser should refresh and display both the application title and the hero name. -## Create a Hero class +## Create a Hero interface A real hero is more than a name. -Create a `Hero` class in its own file in the `src/app` folder. +Create a `Hero` interface in its own file in the `src/app` folder. Give it `id` and `name` properties. -Return to the `HeroesComponent` class and import the `Hero` class. +Return to the `HeroesComponent` class and import the `Hero` interface. Refactor the component's `hero` property to be of type `Hero`. Initialize it with an `id` of `1` and the name `Windstorm`.