I've got a core module named CoreModule
, it contains a service named MapManagerService
, directive named FlyToDirective
which uses the MapManagerService
, and a component named ElementComponent
which uses the the flyTo
.
My AppModule
imports the CoreModule
and uses its' components, plus has its' own MapManagerService
Reading Angular's documentation of Core Modules, you'll notice:
More precisely, Angular accumulates all imported providers before appending the items listed in @NgModule.providers. This sequence ensures that whatever we add explicitly to the AppModule providers takes precedence over the providers of imported modules.
BUT, the FlyToDirective
still uses the imported CoreModule
's MapManagerService
, am I getting the documentation wrong?
I've figured the service that should be used is the AppModule
s MapManagerService
and not the CoreModule
s
Any help would be appreciated, thanks.