Ionic Framework: 3.5.3
Ionic App Scripts: 2.0.2
Angular Core: 4.1.3
Angular Compiler CLI: 4.1.3
Node: 6.10.0
<div *ngFor="let group of groups" style="width: 100%"> <div *ngFor="let key of getKeys(group)"> {{ groups[key] }}</div> <div *ngFor="let key of getKeys(group)"> {{ key }}</div> <div style="width: 50%;float: left; text-align:left;padding: 20px 0px 20px 0px;"><img height="10px" src="http://allcam-app.oss-cn-hangzhou.aliyuncs.com/hebaby/font-icons/red.png"/>{{group.groupName}}</div> <div style="width: 50%;float: right; text-align:right;padding: 20px 0px 20px 0px;"><a href="javascript:void('{{group.groupId}}');">更多></a></div> <div id="cc" style="clear:both"> <div class="row" *ngFor="let res of group.resourceList"> <div class="col"> <div class="col-demo">{{res.resourceName}}</div> </div> <div class="col"> <div class="col-demo">.col</div> </div> </div> </div> </div>
getKeys(item) { return Object.keys(item); }原文链接:https://www.f2er.com/angularjs/146746.html