Since AngularJS 1.5, we can now create components using the component () method of the angular module. But it seems impossible to create a component for the SVG template ...
With the directive (), I was able to use:
.directive('svgInternal', function () {
return {
templateNamespace: 'svg',
template: '<g><rect height="25" width="25" /></g>',
};
})
But with component (), defining templateNamespace is no longer possible ...
In angular> = 2, I know that you can define a namespace prefix in the element tag for components (of course, without working with the AngularJS () component):
template: `<svg:g><rect height="25" width="25" /></svg:g>`
Does anyone know if there is a way to use AngularJS () component with SVG pattern?
From the AngularJS 1.5 component documentation:
If you do not use Components: (...) when you need advanced parameters for defining a directive, such as priority, terminal, multi-element