My observerable and subscribe class looks like below
Observable
Subscribe
Error
On
First check that you have installed the @angular/http in package.json file.
if not then please install it by
npm install @angular/http
Always import the HttpClientInMemoryWebApiModule after the HttpClientModule to ensure that the in-memory backend provider supersedes the Angular version.
and also follow the instruction given in the module introduction angular-in-memory-web-api
It seems that you are missing
@angular/httppackage.You can add it with :
or