I have defined a child component routing.
- I am not able navigate to the default routing from the routerLink.
- Parent path has ':id', so for children routing it's working with a prefix ':id' only.
Route
{
path: ':id', component: InterviewComponent,
children: [
{
path: '',
component: InterviewQuestionsComponent
},
{
path: ':id/interview',
component: InterviewGridComponent
}
]
}
Anchor tags
<ul class="list-unstyled components">
<li>
<a routerLink=""><i class='interviewQuestions'></i> <span style="cursor: pointer;">Interview Questions</span></a>
</li>
<li>
<a routerLink=":id/interview"><i class='interviews'></i> <span style="cursor: pointer;">Interviews</span></a>
</li>
</ul>
<router-outlet></router-outlet>
- I am not able to navigate to default router with 'routerLink=""'
- Routes working only with "path: ':id/interview'"