I can't succeed in build an svg with angularjs when tspan are load from ng-bind-html attribute, Firefox and IE do not display them.
My controler look like that :
$scope.titlenotok="svg not ok";
var content = '<tspan dy="20" x="0" xml:space="preserve">line1 not ok</tspan><tspan dy="30" x="0" xml:space="preserve">line 2 not ok</tspan>'
$scope.notok = $sce.trustAsHtml(content);
I create a fiddle to illustrate
For chrome it's OK.
Robert was right.
Here is my solution. The secret was to use createElementNS. so that, The browser understand that it is a svg element and not a html element.
Here is the directive
Which can be uses like that :
My directive add tspan children for each line of text in mydata and use data-dy attribute as dy attribute for this tspan.