我使用的创建连接到一个HTML元素在我的角度模板对象的第三方JS API。
I am using a third party JS API that creates an object attached to an html element on my angular template.
每个模板被加载时我想重用已创建对象并重新安装到正确的HTML元素。
Each time the template is loaded I want to reuse the object already created and reattach it to the correct html element.
在这个plunker 你可以看到问题的证明。这里有重现步骤。我真的AP preciate任何建议如何preserve页面加载的第一个对象。
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.
先谢谢了。
我想对于map.html模板重用这样的地图页面停留视图之间不变现有地图的对象。
I would like for the "map.html" template to reuse the existing map object so the map stays unchanged between page views.
这是一个不平凡的问题。
This is a non-trivial problem.
href=\"http://ngmodules.org/modules/angular-gm\" rel=\"nofollow\">角克模块重用地图实例,因此不存在内存泄漏的