johnpapa / angular-tour-of-heroes

Angular - Tour of Heroes - The Next Step after Getting Started
Apache License 2.0
825 stars 1.44k forks source link

Breaking change in angular-in-memory-web-api breaks example for http request #134

Closed the-mace closed 6 years ago

the-mace commented 7 years ago

This is no longer correct for the latest version of angular-in-memory-web-api:

.then(response => response.json().data as Hero[])

They made a breaking change and removed the "data" part, so the new line should be:

.then(response => response.json() as Hero[])

This appears in a couple places in the examples.

ManfredLange commented 7 years ago

I second that.

Breaking changes as of version 0.5.0 of angular-in-memory-web-api. See change log. The "Tour of Heroes" tutorial's code should be updated accordingly.

As of writing (08 Oct 2017) at the end of step 6 the "Tour of Heroes" example is broken in that heroes are not listed, cannot be added, edited or deleted. This includes the live example at Plunker (link retrieved on 10 Oct 2017).

With the update in place the tutorial app seems to be working as expected.

jlocans commented 7 years ago

Uhh, this is second breaking change I come across in this tutorial. First one was that angular-in-memory-web-api now has to be installed seperately.

johnpapa commented 6 years ago

fixing for v6 today