Answer the question
In order to leave comments, you need to log in
Error cannot find module '@angular/common/http' angular2?
Hello everyone, I'm studying angular, and I came across this
SSMaker.ru/65f59075 can you tell me what could be causing this error?
https://github.com/Cobr3n/ang2learn - here is the code if anything
Answer the question
In order to leave comments, you need to log in
Everything turned out to be quite simple.
The problem is in the "angular-in-memory-web-api" version. You need to install not the latest version, but 0.2.4. The command looks like this: "npm install [email protected] --save". The point is that the new version of this "angular-in-memory-web-api" works with angular 4.3.0, and there the http module (or client) is implemented in the @angular/common/http folder, in these video tutorials we use the old angular version.
The current recommendation is to use Angular Cli . Better take advantage of it. It will do a lot for you in terms of setting up the project. And if you use webstorm or vscode , then the dependencies will be added automatically (almost). Angular Cli uses webpack , not SystemJS. Angular Cli also exists in the form of plugins for popular IDEs.
@angular/common/http
available only from version 4.3.0.
Update Angular=)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question