I have a case where I want to remove an instance of a component from an array (in parent component) on a button click from inside child component based on some condition.
In the image, 'Add BU' button is in parent component and the three text fields below (namely 'BU', 'G Value' and 'C Value') and one cross button are coming from child component. On each 'Add BU' button click a new row from child component is created in UI. I used the following code to push instances of child to an array in parent :-
Now I have question regarding 2 points here :- 1. How may I delete the same specific child instance from the array in parent, on the same instance cross button click (cross button is inside child) ? 2. How may I send the values added in each text field in each row (i.e. 'BU', 'G Value' and 'C Value') on 'Add' button click ?
Some similar question has already been asked in here and I have used similar approach given in the accepted answer : Add component to dom on click of button in angular2. And my first question is also being asked as the last comment in image below :



