I'm attempting to bind values to the xlink:href attribute of a <use> element contained inside a <svg> element like so:
<svg>
<use [attr.xlink:href]="url"></use>
</svg>
This does not work in either alpha 47 or alpha 46, as no SVG image is displayed. See the following plunk, which illustrates the problem: http://plnkr.co/edit/ELcnoTe2CE5v5r9FUD0c?p=preview
It looks like the xlink:href attribute is missing the correct namespace when binding to it. Executing the following statement in the Chrome developer console when targeting the <use> element fixes the problem:
$0.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", "assets/icons/icons.svg#icons--alert")
I'm attempting to bind values to the
xlink:hrefattribute of a<use>element contained inside a<svg>element like so:This does not work in either alpha 47 or alpha 46, as no SVG image is displayed. See the following plunk, which illustrates the problem: http://plnkr.co/edit/ELcnoTe2CE5v5r9FUD0c?p=preview
It looks like the
xlink:hrefattribute is missing the correct namespace when binding to it. Executing the following statement in the Chrome developer console when targeting the<use>element fixes the problem:$0.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", "assets/icons/icons.svg#icons--alert")