You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Angular and AngularJS discussion
I just finished my first module, now I am working in my second module and realize I am gonna need a service from the first module, I was wondering if I can Provide it in the @NgModule({providers}) list of the second module, I am afraid angular creates two instances of the service if I provide it in two modules.
Sander Elias
unread,
Jun 30, 2019, 3:58:41 AM6/30/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Angular and AngularJS discussion
Hi Sergio,
That is exactly what will happen. Use `{provideIn:root'}` on your services, and don't put them in modules. This will make them "globally" to your app, and the CLI is smart enough to bundle them in the most efficient way.