I have this routing currently in my app-routing module.
<code>
{
path: 'school',
component: SchoolComponent
},
{
path: 'student',
component: StudentComponent
},
{
path: 'student/view',
component: StudentDetailsComponent
},
{
path: 'student/view/:id',
component: StudentDetailsComponent
}
</code>
<code>
{
path: 'school',
component: SchoolComponent
},
{
path: 'student',
component: StudentComponent
},
{
path: 'student/view',
component: StudentDetailsComponent
},
{
path: 'student/view/:id',
component: StudentDetailsComponent
}
</code>
{
path: 'school',
component: SchoolComponent
},
{
path: 'student',
component: StudentComponent
},
{
path: 'student/view',
component: StudentDetailsComponent
},
{
path: 'student/view/:id',
component: StudentDetailsComponent
}
Now I am trying to do a lazy loading to a StudentModule with a studnet-routing module for the 3 paths student, student/view and student/view:id.
How I can do this app-routing module and stuent-routing module?. Here the last two paths are mapped to same component.
I am new to angular and did not find a proper example.