New to angular, sorry if this is a silly question or I explain it improperly.
I have a component that declares an input property called satellites which accesses a Satellite class array. I need to use that property in an ngFor loop to build an HTML table. Instead of getting the information the array stores I am just getting this output
Name Type Operational Orbit Type Launch Date
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
Here is the input property
<app-orbit-list [satellites]="sourceList"></app-orbit-list>
and the class it accesses
export class AppComponent {
sourceList: Satellite[];
constructor() {
this.sourceList = [
new Satellite("SiriusXM", "Communication", "2009-03-21", "LOW", true),
new Satellite("Cat Scanner", "Imaging", "2012-01-05", "LOW", true),
new Satellite("Weber Grill", "Space Debris", "1996-03-25", "HIGH", false),
new Satellite("GPS 938", "Positioning", "2001-11-01", "HIGH", true),
new Satellite("ISS", "Space Station", "1998-11-20", "LOW", true),
];
}
}
and this is the ngFor loop I am trying to use in the table
<tr *ngFor="let newRow of satellites ">{{newRow}}</tr>
any information on how to make this work or even clarification would be appreciated thank you!