gpt4 book ai didi

javascript - Angular js : ngRepeat list down all the data from server

转载 作者:太空宇宙 更新时间:2023-11-04 15:47:11 24 4
gpt4 key购买 nike

我使用 $http get 从 php 服务器成功获取数据。但我不知道如何使用 ngRepear 以表格形式显示数据,因为所有数据都在几个不同的项目中。我将把所有数据对象显示到表的不同行中。下面显示了我从 php 服务器获取的数据。

enter image description here

最佳答案

下面的代码可以给你一些想法

$scope.retrievedData = [];
//retrieve data from your server
//take the data into above scope variable
<table>
<tr ng-repeat = "data in retrievedData">
<td>data.AssetDescription</td>
<td>data.AssetNumber</td>
<td>data.ComputerName</td>

</tr>
</table>

关于javascript - Angular js : ngRepeat list down all the data from server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43469203/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com