This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Templates of type SVG do not transclude elements properly #7383
Closed
Description
This may be related to issue #7265, which was closed after feature release. (Issues #6778 and #5418 appear to be related, but duplicates.)
In that release, directives of type SVG and MathML became possible using replace: true. However, this currently works only with directives that do not have transclusions. For example:
<p>SVG within transclusion (not yet fixed):</p>
<div class="example">
<svg height="30">
<g-with-transclusion>
<rect height="25" width="25" />
</g-with-transclusion>
</svg>
</div>
and directive:
.directive('gWithTransclusion', function () {
return {
template: '<g ng-transclude />',
restrict: 'E',
replace: true,
transclude: true
}
})
fails to render the inner rectangle. Inspecting the elements reveal they're in the wrong namespace. The new feature hasn't been extended to transclusions yet.
Plunker:
http://plnkr.co/edit/pGB1RWFKYMvUW0ImHqyE?p=preview
Way to fix: let's add the feature to transclusions.
Metadata
Metadata
Assignees
Labels
No labels