Reuse an AngularJS template between page views for the same route
I am using a third party JS API that creates an object attached to an html element on my angular template. Each time the template is loaded I want to reuse the object already created and reattach it to the correct html element. In this plunker you can see the issue demonstrated. And here are the steps to reproduce. I really appreciate any suggests on how to preserve the first object between page loads. Thanks in advance. Problem Description To understand the problem: Tap the "Show Map" link above. The "map.html" template is loaded correctly and a map is shown. Move the map or zoom in a little