Angular 4
written in Typescript 2.3.4
component.ts
/**
* Info that drives the tabs in the template. Array is filled
* in ngOnInit() once data is received from the server
*/
public tabs:Array<{
title:string,
description:string,
data:Array<{name:string}>
}>=[];
component.html
<section *ngFor="let t of tabs">
...
<div *ngFor="let i of t.data">{{i.name}}</div>
^^^^^^
</section>
Compiler error
Angular: Identifier 'name' is not defined.
<anonymous>
does not contain such a member
At first I thought this was linked to my other issue but this is different because there is no ambiguity in the shape of the tabs
model: the component clearly shows that name
is a property of each member of the data
array, itself a property of each member of tabs
array.
What's going on here?