Angular - 嵌套的ngFor

时间:2017-06-22 12:44:10

标签: angular nested ngfor

我需要迭代一个嵌套数组的数组,然后显示它的输入。继承人我的做法:

<div *ngFor = "let arrobject of Array">
     <div *ngFor = "let innerObject of arrobject">
          <input type="text">
     </div>
</div>

也尝试ng-container

<ng-container *ngFor = "let arrobject of Array">
     <ng-container*ngFor = "let innerObject of arrobject">
          <input type="text">
     </ng-container>
</ng-container>

输入是正确生成的,但问题是我无法focus开启。

0 个答案:

没有答案