I use many directives to draw and manage complex SVGs. Starting from 1.3. ?? the use of "substitution" in policy factories is outdated. I wonder how I can create the right SVG without using it replace: truein my directives. My directives look like this:
angular.module('app', []).directive('myRect', function() {
return {
restrict: 'E',
replace: true,
templateNamespace: 'svg',
template: '<rect x="20" y="20" width="100" height="50" fill="blue" />'
};
})
See plunk for an example of two SVG directives, one of which uses replace: trueand the other does not.
source
share