Here is my issue skeleton: https://stackblitz.com/edit/angular-jk8dsj
I have two problems in this task:
I want to add element in app.component, when I clicking the button from key-value.component. I do not know how to do it. I'm trying to passing using @Output() decorator, bo it did not work. I think it I think it has to be something like:
<app-key-value [elements]="values" (addElemToParentArray)="???" (rmElemFromParentArray)="???"></app-key-value>
Later I want send this values array to the server. For now in my app component function pushing elements to the array with emty Element values: key: '' and value: ''. How to make the values in the table correspond to the entered input values? I'm trying using ngModel, but values filled after the empty values element push to the array. Do I have to create another Array which is created on submit whole page and sending data to server?