I have the following in the parent component:
output = {};
In the child I have this:
@Input() output: GroupCompnent;
this.output.output = this.gridOptions.api.getSelectedRows();
Now I get this structure:
Object {output: Array(2)}
output Array(2)
[0]:Object
[1]:Object
But I want this:
[Object, Object]
Any suggestion how I can do that?
I want to achive two way data binding with object, so when I change value to child to be referenced on parent and get that data in parent.
Parent:
output = {};
<div *ngIf="visible">
<z-ag-table [items]="gridOptions" [output]="output"></z-ag-table>
</div>
Child:
@Input() output:GroupComponent;
selected = () => this.output.output = this.gridOptions.api.getSelectedRows();