From d65f1943e39cb68fab85f90529fd1ecef38ce065 Mon Sep 17 00:00:00 2001 From: Brad Christie Date: Thu, 23 Mar 2017 19:04:42 -0400 Subject: [PATCH] create() should return Hero model. (#3414) --- public/docs/_examples/toh-6/ts/src/app/hero.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/docs/_examples/toh-6/ts/src/app/hero.service.ts b/public/docs/_examples/toh-6/ts/src/app/hero.service.ts index 18af476123..29fe5c2e0e 100644 --- a/public/docs/_examples/toh-6/ts/src/app/hero.service.ts +++ b/public/docs/_examples/toh-6/ts/src/app/hero.service.ts @@ -61,7 +61,7 @@ export class HeroService { return this.http .post(this.heroesUrl, JSON.stringify({name: name}), {headers: this.headers}) .toPromise() - .then(res => res.json().data) + .then(res => res.json().data as Hero) .catch(this.handleError); } // #enddocregion create