HTTP service and httpmodule error

Hey, I was generally using the observable and httpClient but then I found out that my server doesn’t support cross-origin resource sharing, So I used HTTP as mentioned in Ionic4. But when I used it, it shows me the error message that:


When I google the resaon why: NullInjectorError: No provider for HTTP! They reply that we need to add HttpClientModule. But after I added in my app.module.ts and also my home.module.ts. I still run-in with this error. Here is how my provider service looks like and where it locates: and this is how my folder looks like:

Am I putting HTTP MODULE in the wrong place or was there something wrong with my structure? can someone help me with this! thank u!

PLEASE stop posting text as images.

3 Likes

@siiulan again like all of your other posts and like @rapropos and I suggested please read the official documentation of angular, learn it…go through the basic course… you cant run without learning to walk…

Cheers!

1 Like