Hi Sander,
the service code is
create(name: string): Promise<Hero> {
return this.http
.post(this.heroesUrl, JSON.stringify({name: name}), {headers: this.
headers})
.toPromise()
.then(res => res.json().data)
.catch(this.handleError);
}
and you were right - it is the service code. I returned res.json().data
when I should return res.json() and that now updates the code.
Many thanks for the help.
John
>
--
You received this message because you are subscribed to the Google Groups
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.