Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarify a possible error case #40828

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions aio/content/tutorial/toh-pt3.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ That's the only change you should make to the `HeroDetailComponent` class.
There are no more properties. There's no presentation logic.
This component simply receives a hero object through its `hero` property and displays it.

You may get this error: `Property 'hero' has no initializer and is not definitely assigned in the constructor.ts(2564)`.
It is likely that you use a version of Typescript >= 2.7. To resolve this, simply put an exclamation mark after the variable name like this:
```ts
@Input() hero!: Hero;
```
More information [here](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#strict-class-initialization).


## Show the `HeroDetailComponent`

The `HeroesComponent` is still a master/detail view.
Expand Down