Skip to content

Commit

Permalink
docs: fix issue angular#40941
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cfsamson committed Feb 22, 2021
1 parent d1d1dad commit 1aed398
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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() { }
Expand Down

0 comments on commit 1aed398

Please sign in to comment.