从那里有什么问题吗?
<GridLayout rows="*">
<ListView [items]="tabs">
<ng-template let-item="tab">
<Label [text] = "tab.name"></Label>
</ng-template>
</ListView>
</GridLayout>
在我的控制器中:
this.requestService.get('api/config/tabs')
.subscribe((data:any)=>{
this.zone.run(() => {
var results = [];
data.forEach(item=>{
results.push({name: item.attributes[0].value , id: item.attributes[0].id });
});
this.tabs = results;
});
});
但是为什么输出只有 [Object, Object]