Utilizing the angular reactive forms module to connect to various formgroups within a formarray named "days." This information is displayed in a material drag and drop loop in the template. Upon clicking a button on the loop divs, details about the specific day should appear in a bootstrap modal. When selecting one day, the details show correctly. However, upon selecting another day, it displays data from the previously selected day.
The template has been properly configured with all necessary properties, including FormGroup, formarrayname, formGroupName, and formcontrolname. The HTML for the day modal is structured as follows:
HTML code goes here
Using a manually set index variable to store the index used in the formGroupName. The component.ts code for setting the variable looks like this:
TypeScript code goes here
The openDayModal() function is invoked in the template within this section:
Template code goes here