One way to retrieve data in a view is by utilizing a service or making an HTTP call to a database.
Data can also be accessed through parameters in the URL or via the query string.
However, what if you need to pass a large amount of non-persistent data into a view?
For instance, suppose I have a form for creating a Thing and I want users to preview it. The show view for Thing already exists, but there's too much information to display in a modal or on the same page.
- Using a service may seem unnecessary, and using a database definitely seems excessive.
- Passing the data through the URL could be considered excessive as well.
- Have you thought about using $sessionStorage?
What are your thoughts? Is there a best practice for handling this situation?