arkon / ng-inline-svg

[Inactive] Angular directive for inserting an SVG file inline within an element.
https://echeung.me/ng-inline-svg/
MIT License
210 stars 88 forks source link

lazy-load svgs #101

Open johanchouquet opened 5 years ago

johanchouquet commented 5 years ago

Hi there,

Not sure if this is a bug or a feature request. Here, I use ng-inline-svg. It work well for me. I use it inside a lazy-loaded module. But the thing is: how to lazy-load the svg itself (not the module).

What I want to achieve is to:

  1. use a svg placeholder which would inlined on startup,
  2. then lazy-load the svg
  3. the lazy-loaded svg would then replace the first inlined svg.

So I can't seem to find a way of doing that, even though i've seen that there's an input onSVGLoaded.

Actual behavior: My UI is completely blocked until the svg is loaded.

Thanks for your help