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
from TypeScript 2.3.4 to 2.4.0 and it broke due to (I think) the fact that I was using Headers
and Http
for my POST call. I tried setting it back to 2.3.4 to no avail. I have fixed what I could by adding in:
import { HttpClient, HttpHeaders } from "@angular/common/http";
but still running into the Error I have now for the HttpClient
. I have tried importing HttpClient
into the providers like so: providers: [HttpClient]
for my app.module.ts.
The full error is as follows:
AppComponent.html:9 ERROR Error: StaticInjectorError(AppModule)[HttpClient -> HttpHandler]:
StaticInjectorError(Platform: core)[HttpClient -> HttpHandler]:
NullInjectorError: No provider for HttpHandler!
public getServices(){ return this.http.get("http://report/abcd"); }
– Ralf