-2

My observerable and subscribe class looks like below

Observable

enter image description here

Subscribe

enter image description here

Error

enter image description here

1
  • Are you using angular-inmemory-web-api? You may use it with any incorrect way. This doc may be useful for you. Commented May 21, 2020 at 9:48

2 Answers 2

0

It seems that you are missing @angular/http package.

You can add it with :

npm install @angular/http

or

yarn @angular/http
Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.