InterviewHubPRO
Section Overview
Q197

Question 197 of 283

Part 8: Internationalization (i18n), Testing & DOM Directives (177 - 212)

70%
Angular & Signals (283 Qs)•Part 8: Internationalization (i18n), Testing & DOM Directives (177 - 212)

What is the reason for No provider for HTTP exception?

This exception is due to missing HttpClientModule in your module. You just need to import in module as below,

javascript
import { HttpClientModule } from '@angular/common/http';

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