angular---输入属性

<div>
    <div *ngFor='let val of data'>
      <div >{{val.name}}</div>
      <div [mydata]='val'></div>//error:输入属性只能绑定在组件dom上(angular定义的dom)
        <!--<app-list  *ngIf='val.children' [data]='val.children'></app-list>-->
    </div>
</div>
@Input() mydata

相关推荐