javascript - Data Binding with Angular2 & Inline SVG -


i have svg image, parts of change dynamically depending on responses api call. 1 aspect change colour of different elements within svg, can handle cleanly via applying different css classes. there text elements change.

i have working inlining full svg image component template , picking out parts wish bind model. however, means time want edit raw svg image need copy/paste svg markup template , reapply these bindings.

ideally keep svg external file, inline svg part of build process can avoid sandboxing (something can do), want dynamically apply data bindings via selector (e.g. id/class associated each svg sub-element) after svg inlined. 2 solutions i've come create directive dom manipulation associate relative elements values want set, or modify svg tags in build process post-inline add angular binding syntax here. neither option seems great me.

is there way i'm missing?


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -