I have a form that has a number of dependent parameters fields. That is, changing one parameters field value may cause a server request to repopulate the other parameter fields. After the user sets all of the fields they will press a button and launch in a popup window a new form running the report they specified.
To get the URL for this window I need to make one final call to the server which will return the formatted URL (using GET). So the resultant flow on button click is:
- Gather values from fields
- Call web service to construct URL. (I will use a promise)
- Launch open.window with new URL
The first 2 steps are straight-forward, but I am unsure on how to handle the window.open from the controller. Any thoughts or ideas?
P.S. I thought about using a directive to overwrite the link URL as values changes, but having to go back to server to construct the URL after each parameter changed seems like way too much processing.