I have a Shared Module which is imported in 2 Lazy Loaded Modules viz. Projects Module and Store Module
app.routing.ts file has Root Routes declarations
Contents of Menu Component: It contains app-wide links to major sections of app like projects, store...
I want menu to be part of lazy loaded modules only.
This Works:
Used selector in root Component and all routes work fine as expected....but i don`t want menu to be shown everywhere.
This does not work:
Moved Menu Component to the shared Module (imported, declared and exported), and shared Module is imported to Projects Module. Now i can use selector to show menu, which works fine.
But the links don`t work. App works fine even routes work by typing in browser, but not by clicking in menu component links..
Note: Internal links in projects Module and Store Module work fine.
This does not work too ::
imported app.routing.ts in shared module instead of root.app.module.
This throw an error --> Cant find projects Module
Could not resolve "app/projects/projects.module" from "I:/Code/week-tweak/src/app/app.routing.ts".