I am currently working on my first Angular project and although I have made significant progress, I have reached a point where I feel I need assistance to complete it successfully.
Project Overview: I have a class mod.ts
export interface Mod {
id : number ,
name? : string,
clauseList? : Clause
country? : string;
company? : string;
process? : string;
}
export interface Clause {
cName? : string,
cid? : number,
// pc : number,
parentC? :number,
id? : number,
text? : Text
}
export interface Text {
txt? : string,
tid? : number
}
This is the structure of the form data that will be sent to the backend by the user, with values coming from two different forms named clauseForm and filterForm. The filterForm consists of radio buttons from 4 different arrays, while the clauseForm contains 3 input fields.
I have included a stackblitz demo link for reference.
Here is the process flow: The user selects values from the radio buttons and saves them as an object for later use. Then, the user clicks on the edit form and fills in the fields. Upon clicking "add" in this form, a div should display the text entered in the "txt" field, and simultaneously, all data should be pushed into finalPostArray to be sent to the server. This is my current approach, but I'm open to alternative suggestions. I am struggling with how to combine data from the two forms into one object to send to the server. Any assistance or clarification on this matter would be greatly appreciated.
Stackblitz has been updated. Please refer to the README.txt for more details.