【发布时间】:2018-07-13 03:42:45
【问题描述】:
为了在展开时替换一行,文档如下所示:
<clr-dg-row *ngFor="let user of users">
<-- Cells declarations -->
<clr-dg-cell>...</clr-dg-cell>
<clr-dg-row-detail *clrIfExpanded [clrDgReplace]="true">
Lorem ipsum...
</clr-dg-row-detail>
</clr-dg-row>
这可行,但我也想用我自己的组件替换<clr-dg-row-detail>,这样我就可以延迟加载详细信息。文档如下所示:
<clr-dg-row *ngFor="let user of users">
<-- Cells declarations -->
<clr-dg-cell>...</clr-dg-cell>
<my-detail *clrIfExpanded [user]="user" ngProjectAs="clr-dg-row-detail"></my-detail>
</clr-dg-row>
我尝试将[clrDgReplace]="true" 放在我的自定义组件和 ngProjectAs 内部,但它会引发错误。任何帮助将不胜感激。
【问题讨论】: