Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49268

HTTP service and httpmodule error

$
0
0

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!

2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>