0
OKでオブジェクトを表示する、私はこのangular2
{ "calledCust": { "no": 270, "yes": 9 }, "hasOpened": { "no": 254, "yes": 25 } }
を持っていると私はビューに表示するために、これをしようとしています。
<ul *ngFor="let profile of profiles.counts">
<li>
{{profile | json}}
</li>
</ul>
それはJSON配列ではないので、角度はちょうど
Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
を吹くと私は本当に、以下のような結果を表示したいです。
- calledCust YES:9
- hasOpened YES:ここ25
感謝
EDIT
は、あなただけに必要な完全なJSON
{
total_rows: 279,
bookmark: "g2wAAAABaANkAB5kYmNvcmVAZGI0LnBvcnRlci5jbG91ZGFudC5uZXRsAAAAAmEAYj____9qaAJGQAnZi4AAAABiAAAB7mo",
rows: [],
counts: {
calledCust: {
no: 270,
yes: 9
},
hasOpened: {
no: 254,
yes: 25
}
}
}
whareはオブジェクト内に 'counts'プロップですか? –
@PankajParkar私は質問を編集しました、ありがとう:) – Jason