I am having trouble displaying the length of an array on my HTML page. No errors are showing up in the console either. Can someone help me figure out how to get the total number of heroes?
HTML:
<div *ngFor="let hero of heros">
<div>The total number of heroes is {{hero.length}}</div>
</div>
JSON:
"heros":[
{
"name":"batman",
"id":"A1001"
},
{
"name":"superman",
"id":"A1002"
},
{
"name":"spiderman",
"id":"A1003"
}
]