Can I share services using modules?

Posted by Jennifer | Updated on

No, it is not recommended to share services by importing module. i.e Import modules when you want to use directives, pipes, and components only. The best approach to get a hold of shared services is through ‘Angular dependency injection’ because importing a module will result in a new service instance.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers