【发布时间】:2018-11-13 11:40:13
【问题描述】:
我有一个具有这方面的 JSON 对象:
我希望能够对键值执行绑定,即能够执行 array.company(并显示 value 的内容,例如:“Anonymous 3 Company S.A”)。这可能吗?我只设法一次打印了整个对象:
<div *ngFor="let sa of serverAttributes">
{{ sa.key}}
{{sa.value}}
</div>
这是我的 .ts 文件:
this.subscriptions = this.cbank.getAssetServerAttributes(this.localCustomer, data[indexx]).subscribe(vres => {
this.serverAttributes.push(vres[indexx]);
indexx++;
});
非常感谢!
【问题讨论】:
-
在我的情况下,我应该在变量 filterargs 和 items 中添加什么? stackoverflow.com/questions/34164413/…