我已将值存储在两个数组中以在单个 ion-list 中进行迭代。Billerstatusstate 和 Billerstatusnamelst 是两个数组。
我尝试了以下迭代
<ion-list ion-item *ngFor="let stat of Billerstatusstate;let bil of Billerstatusnamelst " >
{{bil}} <button round>{{stat}}</button>
</ion-list>
和
<ion-list ion-item *ngFor="let stat of Billerstatusstate" *ngFor="let bil of Billerstatusnamelst " >
{{bil}} <button round>{{stat}}</button>
</ion-list>
它为两个局部变量取第一个迭代值。
有什么我想念的吗?
有没有其他方法可以将两个值存储在单个数组中并使用 ngFor 将其拆分到 View 端。