angular - Is it possible to get Angular2 and D3.js working together? -
by working mean can place angular bindings in d3.js code, perhaps
.attr("bind-attr.fill", "acolorvar")
where acolorvar variable can bound color control in angular way.
i can similar things in angular1, unfortunately using $compile. can bind svg attributes when svg used component template.
i believe in angular 2 can setup bindings in templates, not in code, can't think of way work.
the best can think of put d3 code component or directive, can use component/directive properties:
.attr("fill", this.somecomponentproperty)
however, not setup kind of binding. if update property somecomponentproperty
, need execute line of code again.
Comments
Post a Comment