I am trying to initialize an array of a class in angular 5.
export class B{
public Colors: string;
public Temp: number;
public Numbers: number;
}
export class A{
public MyTable: B[];
public othervar: number;
...
...
}
Then I try to initialize MyTable like that:
var test = new A();
test.MyTable[0].Numbers = 25;
test.MyTable[0].Colors= "blue";
Is this correct ?