如何在角度js中使用foreach语句?我目前的数据是以json格式打印出来的。我想把它打印出来。如何在html上使用带有angularjs的foreach
的Html
<p>{{controller.greeting.custinfo}}</p>
//attempt
<p ng-repeat= >{{controller.greeting.custinfo}}</p>
在UI输出
{"id":null,"biling_address":"null","billing_state":"FL","ip_Addresses":["123:111:2101","","NULL"],name":"jimmmy"}
java的输出
System.out.println(custinfo);
[email protected]
我如何使用foreach统计以新行显示数据?而不是JSON格式。
我知道如何与thymeleaf做到这一点,下面的例子
<table th:each="custinfo : ${custinfo}">
<tr>
<td ng-show="id" class="padded">id:</td>
<td ng-show="id" th:text="${custinfo.id}" class="padded"></td>
</tr>
//continue down
对我来说,这将是键/值? –
第一行:'key =“id”'&'value =“null”'。 – lin
好的,关键会工作,但不值。每次更改值。所以我不能只设置值 –