Hello,
I didn't get student id in my ts file by routing,
Student.html file contains :
- <table>
- <tr><th>IDth><th>Nameth><th>Ageth>tr>
- <tr *ngFor="let record of StudentList">
- <td><a [routerLink]="['/students',record.ID]">{{record.ID}}a>td>
- <td>{{record.Name}}td>
- <td>{{record.Age}}td>
- tr>
- table>
- this._activatedRoute.params.subscribe(params => {
- this.studentId = params['StudId'];
- });
- {path:'students/:StudId',component:StudentComponent}
Mahesh VermaPosted May 4, 2018, 5:59 AM
Reena LakraPosted May 4, 2018, 8:07 AM
Ronika JencyPosted May 4, 2018, 7:48 AM
Manav PandyaPosted May 4, 2018, 5:57 AM