As a newcomer to angularJs, I find myself facing an issue with two forms existing in different UI states (URLs) labeled as Step 1 and Step 2. The process requires filling up Step 1 and moving to the next step by clicking the NEXT button, which then leads to the appearance of Step 2 and ultimately the SUBMIT button. The challenge arises when attempting to send the combined JSON data from both forms to the server upon completion of Step 2.
I have utilized $state.go(form_2_url) for the NEXT button functionality; however, transitioning to the next page causes the loss of all previously built JSON data from FORM 1. This raised the question of how to share data among states effectively. It is worth mentioning that I am utilizing a common controller for both states.
Any insights on how to tackle this dilemma in AngularJS would be greatly appreciated.