Thank you very much Sander, I checked the code and I saw the "flat list" for dependency injection and I was searching an official documentation explaining this behavior.
Good point about build tools and inclusion order which may vary. Service redefinition done this way could be very unreliable. Regards, Andrea Il giorno lunedì 31 ottobre 2016 05:26:49 UTC+1, Sander Elias ha scritto: > > Hi Andrea, > > Yes, this is documented somewhere, but I really don't recall the location. > sorry. > > Angular 1 uses a flat list to do dependency injection. So, if you redefine > a something, it simply replaces what is already there. > The "rule" for that is actually quite simple. The last one gets in. > > However, using modern build tools, and the different way's scripts get > loaded, that is not always an easy prediction to make. > Long story cut short, don't use generic/common names. > > Regards > Sander > > -- 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.
