2

I have parent route /details which show employee list in table. I want to open each employee details below its employee row So only one employee details should be visible at a time just below its row.

In short want to create nested expandable table grid using Angular routing.

I have created routing structure and code like this(stackblitz project).
This throws error when tried to revisit the route as

Error: Uncaught (in promise): TypeError: Cannot read property 'component' of null
TypeError: Cannot read property 'component' of null 

Found hard to explain so added GIF below:

enter image description here

If I removed *ngIfcondition from details.component.html Line : 20

<td colspan="2" *ngIf="employee.id === selectedEmployeeId">

Then routing works but it opens all the router outlet at same time.

I have tried many ways but not succeeded, Can anyone please provide the suggestion or update the sample project code.

References:
https://github.com/angular/angular/pull/19374
Uncaught (in promise): TypeError: Cannot read property 'component' of null

Dipak Telangre
  • 1,792
  • 4
  • 19
  • 46

0 Answers0