For example with this JSON:
{
"TableRows": [
{
"Name": "Lord of the Rnis",
"Length": "2:40"
}
],
"Category": "Fantasy"
}
Into these classes:
export interface IMovies{
Category: string;
TableRows: ITableRows[];
}
export interface ITableRows{
Name: string;
Length: string;
}
The following ngFor logic works great, but it's not what I want to loop:
<tr *ngFor="let row of rows">
<td>{{row.Category}}</td>
<td>{{row.TableRows[0].Name}}</td>
<td></td>
</tr>
This logic does NOT work:
<tr *ngFor="let row of rows.TableRows">
<td>{{row.Name}}</td>
<td>{{row.Length}}<td>
</tr>
What am I doing wrong here?