首页 > 解决方案 > 如何在角度中使用 *ngFor 获取多个值

问题描述

如何在 Angular 中将 *ngFor 用于多个值?我想知道 Angular 中 *ngFor 用法的完整描述,我试过这个:

*ngFor="让datas的数据按$index跟踪"

标签: angular

解决方案


来自角度 io 的语法:

<li *ngFor="let item of items; index as i; trackBy: trackByFn">...</li>

关联


推荐阅读