In ts file I have a data like this:
app.component.ts
this.images = [{
asset_id: 'asset_id',
asset_name: 'asset_name'
}];
and html template is as below:
app.component.html
test {{images}}
<div *ngFor="let img of images; index as i">
dddd--<span>{{img.asset_id}}</span>
</div>
The result is like the below:
What is the mistake I am doing here?
You have an
array
ofobject
with one item. So, try this:I created a sample for you here on Stackblitz