diff --git a/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.ts b/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.ts index 020cd6c8e4..bd29c51058 100644 --- a/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.ts +++ b/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.ts @@ -15,10 +15,10 @@ import { MessageService } from '../message.service'; }) export class HeroesComponent implements OnInit { - selectedHero: Hero; + selectedHero?: Hero; // #docregion heroes - heroes: Hero[]; + heroes: Hero[] = []; // #enddocregion heroes constructor(private heroService: HeroService, private messageService: MessageService) { }