Actually, I have two questions about angular 4 best practice.
- I have a service named
RemoteService
, which is responsible for XHR calls. I want to catch component instance, which is using that service, inRemoteService
. So I guess, it is better to provide that service per component level. Because I don't want every methods of the service take component instance by parameter. But, is it good or bad to provide service per component?. By the way:RemoteService
will be used in hundreds of components. - I'm trying to follow style guide of angular. Where should I place
RemoteService
?. Shared feature module or Core feature module?. It's purpose seems likeExceptionService
andLoggerService
. But it is not singleton service as I explained above. It may depends on answer of question 1.