【发布时间】:2023-02-10 10:46:53
【问题描述】:
我正在尝试在我的角度前端显示我的数据集中的数据。我想显示的一些信息嵌套在对象对象中。正如您在下面看到的。我在显示经纬度值时遇到问题。我试过这个html:
<ng-container *ngFor="let geometry of trail?.geometry">
<ng-container *ngFor="let location of geometry?.location">
<ng-container *ngFor="let lat of location?.lat">
{{ lat }}
</ng-container>
</ng-container>
</ng-container>
【问题讨论】:
-
有什么麻烦?你能展示数据示例吗?不清楚,为什么要使用 ngFor