On my webpage, I have a button that opens a popup page. I need to figure out a way to transfer json data from the main page to the popup page. These two pages are running separate angular applications.
Once the data is transferred, it will be updated based on user interactions and then sent back to the main page. I came across a solution on Stack Overflow that involves attaching the data to the $window object in the parent page's controller when launching the popup. The data is then assigned to the scope of the popup and finally sent back to the $window.opener object in the popup's controller for access by the parent page.
While this method works, I am curious if there is an Angular-specific approach that utilizes services for passing data between the two applications. I found a reference to sharing a single service between multiple AngularJS apps at this link. However, I'm searching for a cleaner and more direct solution that does not heavily rely on the $window object within the controllers. My goal is to create a shared service that facilitates data transfer between the parent and popup pages without depending too much on external objects like $window.