From 1aed39829457606f7711501be1476dd5a81d0d1b Mon Sep 17 00:00:00 2001 From: Carl Fredrik Samson Date: Mon, 22 Feb 2021 17:03:02 +0100 Subject: [PATCH] docs: fix issue #40941 setting the `hero` property as an optional property fixes the compilation error: `Property 'hero' has no initializer and is not definitely assigned in the constructor` when having the ts transpiler set to "strict" mode. --- .../toh-pt3/src/app/hero-detail/hero-detail.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.ts b/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.ts index 973c5b2b5a72e..e73308af5bfe5 100644 --- a/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.ts +++ b/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.ts @@ -13,7 +13,7 @@ import { Hero } from '../hero'; }) export class HeroDetailComponent implements OnInit { // #docregion input-hero - @Input() hero: Hero; + @Input() hero?: Hero; // #enddocregion input-hero constructor() { }