svg: prefix

This is the documentation for Angular 6.
You can switch to the latest version Angular 7.

An SVG snippet template needs an svg: prefix on its root element to disambiguate the SVG element from an HTML component.

<svg:rect x="0" y="0" width="100" height="100"/>

An <svg> root element is detected as an SVG element automatically, without the prefix.

<svg>
  <rect x="0" y="0" width="100" height="100"/>
</svg>
Tutorials