diff --git a/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.ts b/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.ts index 362230dca7..dc6439a4bd 100644 --- a/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.ts +++ b/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.ts @@ -33,7 +33,7 @@ export class HeroDetailComponent implements OnInit { } getHero(): void { - const id = +this.route.snapshot.paramMap.get('id'); + const id = Number(this.route.snapshot.paramMap.get('id')); this.heroService.getHero(id) .subscribe(hero => this.hero = hero); }