这是我的代码:
saveHierarchyData() {
debugger;
this.hierarchySwitch = 'currentHierarchies';
this.topLevelArray.unshift(this.levelsArray);
}
levelsArray[
{levelName: "",
HierarchyName: "",
ConditonName: ""
}
]
我将'levelsArray'推送到'topLevelArray'。我的HTML是
<li *ngFor="let hierarchies of topLevelArray" [@deleteAnim]>
<div class="hierarchyName">
<span>{{hierarchies.hierarchyName}}</span>
</div>
<div class="actionIcons">
<i class="fa fa-pencil"></i>
<i class="fa fa-trash" (click)="deleteLevel(hierarchies)"></i>
</div>
</li>
现在,我的问题是我需要在上面'li'中的span中显示'HierarchyName'值。这是我的'topLevelArray'数组控制台的屏幕截图:
如何填充span元素中的hierarchyyname值?