I’m encountering an issue with module dependencies in my Angular application. I have a CoreModule where I’ve declared certain components, services, or pipes. This CoreModule is then imported into the AppModule. However, components declared in other feature modules, which import a SharedModule that also imports CoreModule, cannot access declarations (components, services, pipes) from the CoreModule. Components can only use these declarations if they are declared directly in the AppModule.
Why can’t components in feature modules, which import SharedModule, access declarations from CoreModule, and how can I ensure that all modules, including SharedModule, have access to declarations from CoreModule?