ERROR Error: StaticInjectorError(AppModule)[UserformService -> HttpClient]:
Make sure you have imported HttpClientModule instead of adding HttpClient direcly to the list of providers. See https://angular.io/guide/http#setup for more info. The HttpClientModule actually provides HttpClient for you. See https://angular.io/api/common/http/HttpClientModule: Code sample: import { HttpClientModule, /* other http imports */ } from “@angular/common/http”; @NgModule({ // …other declarations, providers, entryComponents, etc. imports: [ HttpClientModule, // …some … Read more