Why not to try simple (but powerful) html()
method:
iElement.html('<svg width="600" height="100" class="svg"></svg>');
Or append
as an alternative:
iElement.append('<svg width="600" height="100" class="svg"></svg>');
And , of course , more cleaner way:
var svg = angular.element('<svg width="600" height="100" class="svg"></svg>');
iElement.append(svg);
Fiddle: http://jsfiddle.net/cherniv/AgGwK/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…