Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit d65f194

Browse files
bchristiewardbell
authored andcommitted
create() should return Hero model. (#3414)
1 parent a083fdb commit d65f194

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/docs/_examples/toh-6/ts/src/app/hero.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class HeroService {
6161
return this.http
6262
.post(this.heroesUrl, JSON.stringify({name: name}), {headers: this.headers})
6363
.toPromise()
64-
.then(res => res.json().data)
64+
.then(res => res.json().data as Hero)
6565
.catch(this.handleError);
6666
}
6767
// #enddocregion create

0 commit comments

Comments
 (0)