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 VermaRank #475 · 5.2K reputationPosted May 4, 2018, 1:59 AM EDT
Manav PandyaRank #166 · 14.3K reputationPosted May 4, 2018, 1:57 AM EDT
Reena Lakra146 reputationPosted May 4, 2018, 4:07 AM EDT
Ronika JencyRank #770 · 3K reputationPosted May 4, 2018, 3:48 AM EDT