My app hierarchy is as follows:
- app(root)
- Modules (module)
- Master
- Detail
- Nav
- Create/home (component)
- Fields (module)
- Detail (component)
- Master (component)
- Modules (module)
modules-routing.module.ts
const routes: Routes = [
{ path: 'modules-detail/:module_name', loadChildren: './module-detail/module-detail.module#ModuleDetailModule' },
{ path: '', component: ModulesMasterComponent }
];
modules-detail-routing.module.ts
const routes: Routes = [
{
path: '',
component: ModulesNavComponent,
children: [
{ path: '', component: CreateModuleComponent },
{ path: 'new', component: CreateModuleComponent },
{ path: 'fields', loadChildren: './fields/fields.module#FieldsModule' }
]
}
];
fields-routing.module.ts
const routes: Routes = [
{
path: '',
component: FieldsMasterComponent
},
{
path: ':field_id',
component: FieldDetailComponent
}
];
Problem
When i redirect to /modules/testModuleName/fields, I am trying to access my module_name param thats declared in the modules-routing.module (testModuleName).
However, my route params come up empty when i am in the fields module.
I am able to see the param in the create/home component, but not in the child modules. Any help would be appreciated!