const routes: Routes = [
{ path: '', redirectTo: '/students', pathMatch: 'full' },
{
path: 'students',
component: StudentsComponent,
children: [
{ path: '', component: StudentSignupComponent },
{ path: 'all-students', component: AllStudentsComponent },
{ path: ':id', component: StudentComponent}
]
},
<ul *ngFor="let student of students; let i = index" class="list-group">
<a [routerLink]="[i]">e
I encountered an error when using this code:
Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'students/all-students/0'
What steps should I take to resolve this issue?