Unclear on how to display or iterate through object objects? Take a look at my example:
Row{
id: 1,
widget:{
name: 'bla bla',
location:{
top: 255, right: 0, bottom :0, left: 0;
}
}
location:{
top: 255, right: 0, bottom :0, left: 0;
}
}
https://i.sstatic.net/kqqVK.png
Check out the HTML snippet below:
<div *ngFor="let row of canvas; let r = index" >
<div class="row" style="padding-top: row.location.top;">
ROW {{row}} {{ row.location | json}}
</div>
</div>
I want to inline the row.location.top
value from the object in the style. The output for row.location | JSON
is shown here:
https://i.sstatic.net/vCowH.png
However, when I try {{ row.location.top | json}}
, it comes up empty.