What is the best way to share data (Object) between controllers with different routes and prevent data loss after a page reload?
I have an object that I need to use to prefill form values on my destination page based on choices made on my source page.
So far, I have considered two solutions:
1- Sending serialized Objects as query string parameters.
2- Using local storage and adding a special parameter to the URL to indicate when to fetch from local storage and when to open an empty form.
Solutions that are not viable for me:
1- Shared service, as my data would be lost after a page reload in this scenario.
If there is no other way, which of these methods is more preferable?
Note: The data must remain intact even after reloading the page.