Angular: Best Practices
Armen Vardanyan
1K15

So I’m having some trouble implementing the abstract service and then extending it for use in a service. When I try I get an error:

Error: No provider for http!

I’ve provided the HttpModule in app.module, and imported it into the abstract service class. Still no go.

Any thoughts would be much appreciated.

EDIT:

After some more experimentation, it appears that if you are using the extended service inside a different module, for example “myFeatureModule”, you also need to import the HttpModule into that module.

Like what you read? Give Benjamin Hobbs a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.