While trying to add a PrimeNG table I broke my build here: https://github.com/BillyCharter87/Tech-O-Dex-UI/tree/BrokeIt
I recall updating my package.json
fr
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 other imports
],
})
export class AppModule { }