I have followed the Tour-of-Hero tutorial on Angular2 official page. But I took it a step further by introducing Modules lazy-loading.
I've got the following Feature Modules:
Module
Dashboard- dashboard component
Module
Hero- hero-list component
- hero-detail component
- hero-search component
- hero-search service
- hero model
The hero-search component is a directive that should be used in the Dashboard Module.
However, according to this documentation about Angular2 architechture, Routed module should not be imported by others. Meaning, I should not import the Hero module into the Dashboard module. If I do, my routes are no longer working anyway.
Also the hero-search component uses a hero-service and the hero-model, so it has strong dependencies on Hero Module, making it hard to externalize.
So how am I supposed to use the hero-search component in the Dashboard component ?