X-Git-Url: https://juplo.de/gitweb/?p=examples%2Fangular-tour-of-heroes;a=blobdiff_plain;f=src%2Fapp%2Fhero.service.ts;h=a59d76b34df6adf37ced337d7cc2c32dbfb855eb;hp=7e0771a50dad343ed98dbbc01cb0ab1a2592a058;hb=88fd95b95db3ee160af3eb441daaf69a6419c2b7;hpb=ef15a90ba71bcff7765f089af11e2ad22752a352 diff --git a/src/app/hero.service.ts b/src/app/hero.service.ts index 7e0771a..a59d76b 100644 --- a/src/app/hero.service.ts +++ b/src/app/hero.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; +import { Observable, of } from 'rxjs'; import { Hero } from './hero'; import { HEROES } from './mock-heroes'; @@ -10,7 +11,7 @@ export class HeroService { constructor() { } - getHeroes() : Hero[] { - return HEROES; + getHeroes() : Observable { + return of(HEROES); } }