Aks*_*hay 5 html angularjs angularjs-ng-repeat
所以我有一个List,我从休息服务返回.现在,我希望以列格式显示此对象,现在在第一行中显示.所以它会是这样的:
firstName: Bob Alice
LastName: Doe Joe
EmailId: bob@xyz.com alice@abc.com
ContactNo: 123123 12444
Run Code Online (Sandbox Code Playgroud)
那么如何在这里使用ng-repeat:
<tr>
<th>firstName:</th>
<td>('Name should be displayed here')</td>
</tr>
Run Code Online (Sandbox Code Playgroud)
Tom*_*Tom 14
您可以在td元素上使用ng-repeat.
<tr>
<th>firstName:</th>
<td ng-repeat="person in people">{{person.firstName}}</td>
</tr>
<tr>
<td ng-repeat="person in people">{{person.lastName}}</td>
</tr>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
15162 次 |
最近记录: |