I am using element.append method, but nothing appears on the screen. Seems that svg doesnt render elements if I use this method. Here is example.
app.directive('dir', function($document){
return{
restrict: "A",
link: function(scope, element, attr)
{
scope.add_circle = function (){
var area = angular.element( document.querySelector("#draw_area") );
area.append("<circle cx=50 cy=50 r=10 fill='red'></circle>");
alert("Circle appended!")
};
}
}
});