Angular: 'NullInjectorError: No provider for HttpClient'
@devsingh05▲ 5 net votes
Services that inject HttpClient need it provided. In standalone Angular apps add provideHttpClient() to the providers in app.config.ts (bootstrapApplication); in NgModule apps import HttpClientModule (or use provideHttpClient) in the root module. The same error pattern appears for any service not provided in root or in the component's providers.