I'm currently developing a web application that allows users to view objects on a map, click on a marker, and navigate to a new section with specific information. This information can lead to further details as well.
For example:
- /map
- /tree/{treeid}
- /tree/{treeid}/information/{informationid}
I have successfully maintained the model state while navigating between routes/states. However, my challenge lies in ensuring that the entire map (with markers) does not need to be recalculated when going back in the browser history. Essentially, I want to preserve the rendered state of /map when progressing deeper into the application.
One way to achieve this is by using search parameters instead of routes on /map (e.g., /map?treeid=10), disabling reload on search, and employing ng-hide="treeid" on the map object and ng-show on the tree-info object.
My question is whether there is a more effective and appropriate method of accomplishing this in Angular?
Thank you for your assistance.