parent
e3709f5d48
commit
a167bca927
|
@ -30,7 +30,7 @@ export class HeroService {
|
||||||
getHeroes (): Observable<Hero[]> {
|
getHeroes (): Observable<Hero[]> {
|
||||||
return this.http.get<Hero[]>(this.heroesUrl)
|
return this.http.get<Hero[]>(this.heroesUrl)
|
||||||
.pipe(
|
.pipe(
|
||||||
tap(heroes => this.log(`fetched heroes`)),
|
tap(heroes => this.log('fetched heroes')),
|
||||||
catchError(this.handleError('getHeroes', []))
|
catchError(this.handleError('getHeroes', []))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue