I have table where when I click the line is displayed in a component different from the table to pass the information I use the @input decorator but when I try to display the result in my other component I have [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}}