Jorek, I've recently started playing with angular, and I've been looking at SVG as well. What I've seen, looking in the chrome dev tools, is that the created node is not an SVG node, but a plain HTML node. I tried a number of different things, and came up with the following, which is appears to work for the limited case I have:
Basically, it is replacing the 'template' object in the compile function for another object. Part of the problem, I think, is that the HTML5 handling of SVG means that outside of an SVG object, the rect is just a 'normal' HTML object.
I also tried setting the template to a pre-built angular.element object, but it tried to convert it to a string, and that failed miserably....
I also tried adding an 'XML' prolog to the template, but angular complained because the template had too many roots.
Finally, I tried wrapping the svg elements inside an SVG element, and in the compile method 'transforming' the DOM to remove the parent. However, that didn't really work, as the values of attributes weren't being updated (but debugging does at least show that the 'right' node types were being created).
I was actually interested in trying to create some directives that could generate either SVG or equivalent VML structures (as for a project at work I'd need to be able to support IE 8 for most users), but my initial investigation makes it seem more difficult than I was hoping - I know I could just use Raphael, but pulling in another library to support a couple of simple diagrams seems like overkill, particularly when angular looks like it supports all the other functionality I'd like.
Note that this approach doesn't copy any child elements, but in principle it could be extended to do handle this, and even convert them appropriately. I was actually about to post a question to the list about how to handle inserting 'namespaced' elements from within a template - so far this is the only approach that I've found that sort of worked, but it seems to be fighting the framework rather than using it :-(. If anyone has a better solution, I'd love to hear it....
-Peter