following on from this question:
how to write a directive for angularjs that replaces dom elements without using ng-transclude?
I wish to write a directive that changes the dom element but then retains all the attributes and bindings.
<g:text x={{myX}} y={{myY}} font-size=10>Hello There</g:text>
to
<text x={{myX}} y={{myY}} font-size=10>Hello There</text>
thanks in advance!
Use the same logic and copy the attributes during the compile:
fiddle: http://jsfiddle.net/YWfSF/