Two. Basically, you want a module to provide the service. So, if you've got one module for your application, it is your application module that should provide the service.
On Sat, Dec 8, 2018, 12:50 Reza Razavipour <reza.razavip...@gmail.com> wrote: > If you provide a service in two components’ “providers” section of > @Component decorator, how many instances of service shall get created? > > -- > You received this message because you are subscribed to the Google Groups > "Angular and AngularJS discussion" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to angular+unsubscr...@googlegroups.com. > To post to this group, send email to angular@googlegroups.com. > Visit this group at https://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- Lucas Lacroix Computer Scientist Advanced Technology Division, MEDITECH <http://ehr.meditech.com/> 781-774-2293 -- <https://ehr.meditech.com/expanse> <https://www.linkedin.com/company/meditech> <https://twitter.com/MEDITECH> <https://www.facebook.com/MeditechEHR> Subscribe <https://info.meditech.com/get-great-meditech-content?hsCtaTracking=864299ec-5abf-4004-9c6d-2d051794101f%7Cc911be42-538a-4a48-8dca-a6d4001c6326> to receive emails from MEDITECH or to change email preferences. -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.