FrontendDeveloper.in

Angular question detail

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,

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

@NgModule({
imports: [
BrowserModule,
HttpClientModule,
],
declarations: [ AppComponent ],
bootstrap:    [ AppComponent ]
})
export class AppModule { }
Back to all Angular questions
Get LinkedIn Premium at Rs 399