I already deleted it, closed it and opened it again, I redid the line, played in the gpt chat and I can’t.
What exactly are you trying to do here?
When something is crossed it means it’s deprecated
4 Likes
Since your VS Code is up to date, it’s important to note that in recent Angular versions, we no longer use HttpClientModule
.
As stated in the official Angular documentation, HttpClientModule
is now deprecated:
HttpClientModule • Angular
Instead, in the new Angular architecture (standalone APIs), you should use provideHttpClient
in your main.ts
.
Here’s an example:
// main.ts
bootstrapApplication(AppComponent, {
providers: [
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
provideIonicAngular(),
provideRouter(routes, withPreloading(PreloadAllModules)),
provideHttpClient(withInterceptors([yourInterceptor])),
importProvidersFrom(IonicStorageModule.forRoot()),
],
});