Mountain View


StaticInjectorError(AppModule) in Angular.

Posted On : 09-Jan-2019 [498]




StaticInjectorError(AppModule) in Angular.


Below changes may resolve your problem

Change 1 : Add your service in ngmodule providers
@NgModule({
  ...
  providers: [ yourServiceName ]
})

@Component({
  ...
  providers: [ yourServiceName ]
})




Change 2:
import {HttpClientModule} from '@angular/common/http';
add HttpClientModule to your ngModule imports;




Related Articles
Recent Articles
Most Viewed Articles