X-Git-Url: https://juplo.de/gitweb/?p=examples%2Fangular-tour-of-heroes;a=blobdiff_plain;f=src%2Fapp%2Fheroes%2Fheroes.component.ts;h=1e29d4ed1da92a0054178612070458f41dfb9417;hp=94f426656a78890c89a2966a9d9d7687511858eb;hb=88fd95b95db3ee160af3eb441daaf69a6419c2b7;hpb=ef15a90ba71bcff7765f089af11e2ad22752a352 diff --git a/src/app/heroes/heroes.component.ts b/src/app/heroes/heroes.component.ts index 94f4266..1e29d4e 100644 --- a/src/app/heroes/heroes.component.ts +++ b/src/app/heroes/heroes.component.ts @@ -24,6 +24,8 @@ export class HeroesComponent implements OnInit { } getHeroes() : void { - this.heroes = this.heroService.getHeroes(); + this.heroService + .getHeroes() + .subscribe(heroes => this.heroes = heroes); } }