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