flobacher / SVGInjector2

Fast, caching, dynamic inline SVG DOM injection library
MIT License
57 stars 8 forks source link

Doesn't work well with multiple ng-apps on a single page #21

Open vvolodin opened 7 years ago

vvolodin commented 7 years ago

I know it's a boundary case but I have 2 angular apps running on a single page, both are using svg-injector and it throws an error if I try loading the same svg URL in both apps. It looks like process queue is being processed twice and since the queue contains a hash of URLs with elements the second pass through the queue encounters empty elements from the first app that have been replaced already.

flobacher commented 7 years ago

could you send me a gist where you show me, what your exact problem is? thank you very much!