diff --git a/public/docs/_examples/toh-6/ts/app/hero.service.ts b/public/docs/_examples/toh-6/ts/app/hero.service.ts index 49c760073e..c16f7a89fd 100644 --- a/public/docs/_examples/toh-6/ts/app/hero.service.ts +++ b/public/docs/_examples/toh-6/ts/app/hero.service.ts @@ -17,7 +17,7 @@ export class HeroService { private headers = new Headers({'Content-Type': 'application/json'}); // #enddocregion update // #docregion getHeroes - private heroesUrl = 'app/heroes'; // URL to web api + private heroesUrl = 'api/heroes'; // URL to web api constructor(private http: Http) { } @@ -33,8 +33,8 @@ export class HeroService { .catch(this.handleError); // #enddocregion catch } - // #enddocregion getHeroes + // #enddocregion getHeroes getHero(id: number): Promise { return this.getHeroes() .then(heroes => heroes.find(hero => hero.id === id)); @@ -71,11 +71,11 @@ export class HeroService { } // #enddocregion put, update - // #docregion handleError + // #docregion getHeroes, handleError private handleError(error: any): Promise { console.error('An error occurred', error); // for demo purposes only return Promise.reject(error.message || error); } - // #enddocregion handleError + // #enddocregion getHeroes, handleError }