Object {0: Object, 1: Object, 2: Object, 3: Object, 4: Object, httpStatus: 200, httpStatusText: null, httpBodyText: "[object Object],[object Object],[object Object],[object Object],[object Object]"}
0:Object (example of object i opened to show content)
CountryInitials : "US"
Id: "101"
CountryName: "United States"
Population: 318.9
__proto__:
Object
1:Object
2:Object
3:Object
4:Object
這是我的瀏覽器中的一個例子,它顯示瞭如何接收數據,所以它包含對象的對象,並且我想像它的數組一樣對待它,而且我認爲這是但它不工作....不能在html中打印一個對象列表
這是HTML:
<div *ngFor="#obj of myList>
<div><b>Country ID:</b> {{obj.Id}} <b>Country Name:</b> {{obj. CountryName}}}</div>
</div>
和它不工作...我不知道爲什麼,我只是想呈現的清單具有國家/地區編號和國家/地區名稱的對象..
EXCEPTION:
EXCEPTION: Error trying to diff '[object Object]' in [myList in [email protected]:31]
有人可以幫我解決這個問題嗎?
謝謝!