我有以下组件,它为数组中的每个元素显示自己类型的子组件.
原文链接:https://www.f2er.com/angularjs/240380.html@Component({ selector:'pane',template: ` <pane [item]="item"> <div> <pane *ngFor="#subItem of item.subItems" [item]="subItem"></pane> </div> <div innerHtml="item.getContent()"></div> </pane> ` )} export class Pane { @Input() item: any; }