Would it not be enough then to do it in the app module since it will be available down the component tree? Or is it only certain things that are available in the hierarchy? If yes, which ones are they?
On Sunday, 1 January 2017 16:38:56 UTC+5:30, Lucas Lacroix wrote: > > Hi Sathish, > You're importing the definitions so that they can be referenced within > your code. > > This is fairly typical of most languages that do imports (Java, C++, C#, > etc.) and is not specific to Angular. > > On Sun, Jan 1, 2017 at 5:55 AM Sathish VJ <[email protected] <javascript:>> > wrote: > >> I did not quite understand what needs to be imported only once and what >> all multiple times. >> >> Why is it not enough to import Http only once in app-module? Why do I >> have to import it again in every service? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Angular" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> 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 > -- You received this message because you are subscribed to the Google Groups "Angular" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
