Below is sample angular project which implements a sample Users Listing with datagrid row expand feature.
Now as a standalone webapp, it is throwing error while navigating to next page as shown below:
If I comment the "" in parent component. the error will disappear.
Steps to run project:
prerequisite: 1. node.js version 6.9 or higher 2. npm install 3. npm install -g json-server
Run:
Here is the project seed with code https://drive.google.com/open?id=1Meeo_SXZEJfYyboihimJGr2DtJHeMP8k or https://nofile.io/f/q4FerHzV0Z0
As I need json-server, I'm uploading sample project instead of plunker/stackblitz. let me know what is wrong with this code.
From Datagrid expandable rows additional features, it would seem you have the *clrIfExpanded
directive in the wrong place.
user-row-detail.component.ts
<ng-template ngFor let-child [ngForOf]="children" *clrIfExpanded>
<clr-dg-row-detail>
<clr-dg-cell>{{child.username}}</clr-dg-cell>
<clr-dg-cell>{{child.fullName}}</clr-dg-cell>
<clr-dg-cell>{{child.role}}</clr-dg-cell>
</clr-dg-row-detail>
</ng-template>
instead of
<ng-template ngFor let-child [ngForOf]="children">
<clr-dg-row-detail *clrIfExpanded>
<clr-dg-cell>{{child.username}}</clr-dg-cell>
<clr-dg-cell>{{child.fullName}}</clr-dg-cell>
<clr-dg-cell>{{child.role}}</clr-dg-cell>
</clr-dg-row-detail>
</ng-template>