When I have a table and click on a row, the information is supposed to be displayed in a different component using the @input decorator. However, instead of displaying the correct result in my other component, I am getting [object Object].
table.html
<tr mat-row *matRowDef="let row; columns: displayedColumns;" (click)="selected(row)"></tr>
</table>
table.ts
public selectedArrayParent!: Product;
selected(row:Product) {
this.selectedArrayParent = row;
console.log(this.selectedArrayParent);
}
info.ts
@Input() public selectedArrayEnfant!: Product;
info.html
{{selectedArrayEnfant}}