when I installed angular 18, I have found that http folder is missing from the common folder.
npm i @angular/[email protected] --save
Now Angular suggessted to call provideHttpClient in the Provider section. But how I import that provideHttpClient? In many example it is showing that below part of code –
import { provideHttpClient } from '@angular/common/http';
But unfortunately the ‘@angular/common/http’ part is missing in the Angular 18.
If anybody upgrade his/her angular version to 18, then he/she automatically found the http folder under the common folder (because it was as it is in earlier versions). So the project will run. But if the same project is going to the docker, then docker used to remove all the file and run the command “npm install”, then the same code will fail.
Anybody knows the resolution?
Already tried to install angular common several times and not found the http folder.
sanu82624 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.