diff --git a/aio/content/examples/toh-pt6/src/app/hero.service.ts b/aio/content/examples/toh-pt6/src/app/hero.service.ts index 068da510b2..c98030c9d2 100644 --- a/aio/content/examples/toh-pt6/src/app/hero.service.ts +++ b/aio/content/examples/toh-pt6/src/app/hero.service.ts @@ -84,7 +84,7 @@ export class HeroService { // if not search term, return empty hero array. return of([]); } - return this.http.get(`api/heroes/?name=${term}`).pipe( + return this.http.get(`${this.heroesUrl}/?name=${term}`).pipe( tap(_ => this.log(`found heroes matching "${term}"`)), catchError(this.handleError('searchHeroes', [])) ); diff --git a/aio/content/examples/universal/src/app/hero.service.ts b/aio/content/examples/universal/src/app/hero.service.ts index ef490ecff6..18f9b72d2d 100644 --- a/aio/content/examples/universal/src/app/hero.service.ts +++ b/aio/content/examples/universal/src/app/hero.service.ts @@ -64,7 +64,7 @@ export class HeroService { // if not search term, return empty hero array. return of([]); } - return this.http.get(`api/heroes/?name=${term}`).pipe( + return this.http.get(`${this.heroesUrl}/?name=${term}`).pipe( tap(_ => this.log(`found heroes matching "${term}"`)), catchError(this.handleError('searchHeroes', [])) );