Saturday, 15 January 2011

angularjs - How to use angular $compile with d3.js to manipulate SVG string? -


I have a bunch of icons stored in the form of strings. I am working on an instruction to add these basic markings to the dome - with some options for manipulation - adding the size of a framework, adding filling and adding stroke etc. My instructions look at the properties of the $ element, accordingly updates the scope. I am using ng-bind-html inside the template to render the symbol. I am quite new to Kangaroo, and this is the most complex problem that I have solved so far. I am using compilation like this:

  $ compile (icon) (scope, function (e, s) {var svg = d3.select (e) .append ("circle" ). Attr ("r", "20") ... ...} [0] .autter HTML)  

Am I on the right track?


No comments:

Post a Comment