OK angezeigt, ich habe dieseein Objekt in angular2
{ "calledCust": { "no": 270, "yes": 9 }, "hasOpened": { "no": 254, "yes": 25 } }
und ich habe dies versucht, in der Ansicht angezeigt werden soll.
<ul *ngFor="let profile of profiles.counts">
<li>
{{profile | json}}
</li>
</ul>
weil es kein json Array ist, Winkel bläst gerade oben mit
Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
und ich möchte wirklich, wie unten die Ergebnisse anzuzeigen.
- calledCust YES: 9
- hasOpened JA: 25
Vielen Dank
EDIT
hier ist die volle json
{
total_rows: 279,
bookmark: "g2wAAAABaANkAB5kYmNvcmVAZGI0LnBvcnRlci5jbG91ZGFudC5uZXRsAAAAAmEAYj____9qaAJGQAnZi4AAAABiAAAB7mo",
rows: [],
counts: {
calledCust: {
no: 270,
yes: 9
},
hasOpened: {
no: 254,
yes: 25
}
}
}
Was ist "zählt" Prop innerhalb Objekt? –
@PankajParkar Ich habe die Frage bearbeitet, danke :) – Jason