Angular add dynamically SVG to SVG root Element

Viewed 111

I want to add an SVG element like rect dynamically to the SVG root element. This point is working fine now so that we can see the SVG g-element in the DOM, but the SVG element does not get rerendered so that the new SVG element get displayed in the browser.

I was researching the issue and I found similar issues at the Angular github page:

I tried these solutions, but I don't get it to work so that the newly added SVG element will get displayed in the browser.

Here is my Link to Stackblitz: https://stackblitz.com/edit/angular-ivy-dj7wto?file=src%2Fapp%2Fparent%2Fparent.component.ts

Can someone help to get around this issue?

0 Answers
Related