Is there a way to directly access components created within nested modules through the URL path in a browser?
app module
-- device module
-- module-building module
-- BuildingComponent
The 'module-building' module is nested under the device module, which is in turn under the app module.
I am trying to access the BuildingComponent of the 'module-building' module directly through the URL in a browser.
In device-routing.module.ts, I have set it up like this:
{
path: 'building', loadChildren: () => import(`./module-building/module-building.module`).then(m => m.ModuleBuildingModule)
}
In module-building-routing.module.ts, I have configured it as follows:
{
path: 'building3', component: BuildingComponent
}
However, when I attempt to access the BuildingComponent using the following URL, it does not load:
http://localhost:4200/building/building3
What could be missing here? As a newcomer to Angular, any guidance would be appreciated.