HttpClientModule is deprecated in Angular 18, what's the replacement?
19:10 04 May 2024

I have a project I migrated to Angular 18 with a setup to use the HttpClient by importing the HttpClientModule.

@NgModule({
  imports: [
    BrowserModule,
    HttpClientModule,
    ...
  ],
  declarations: [
    AppComponent,
    ...
 ],
  bootstrap: [ AppComponent ]
})
export class AppModule {} 

In v17 HttpClientModule everything was fine but now it is marked as deprecated.

Why is it deprecated and what is the replacement ?

angular angular-httpclient