Behold, an SVG Circle:
<svg viewBox="0 0 104 104">
<circle cx="52" cy="52" r="50" stroke="#003EFF" stroke-width="4" fill="#00FF98" />
</svg>
The Angular Project imports it in this manner:
import circle from './circle.svg';
Then, it is added to a div
element like this:
<div [innerHTML]="svg" style="width:400px"><div>
However, it appears that Angular's XSS protection is stripping the content. Is there a workaround for this issue?
An attempt was made using the DomSanitizer
instance like this:
constructor(private sanitizer: DomSanitizer) {
this.trustedCircle = sanitizer.bypassSecurityTrustUrl(this.svg);
But unfortunately, it was not successful.