angular/angular.js — pull request #5419 by mikepro (2013-12-15 23:55:21+00:00)
Title: feat($compile, jqLite): Change directive definition object to allow temp...

...lates to be created within a given xml namespace

When creating a new directive and a template was specified, along with the replace option being set to true in the Directive Definition Object angular would create the elements contained within the template with the namespace of the HTML page. Whilst this is fine for the vast majority of the cases if you ever need to use xml in your template as in SVG this causes a problem. As the newly created elements are in the HTML namespace and not SVG.

This change introduces a new property on the Directive Definition Object "templateNS". This new property allows you to pass in a string to serve as the default namespace for the elements or to pass in an object. Where key is the xml prefix and value is the namespace.