How to use HTML elements inside SVG in Angular?

Asked

Viewed 140 times

0

I was using SVG in Angular when I needed to put HTML elements inside it. So I first tested it in w3schools. Image with the code and expected result below.

Código e resultado no w3schools

Then I replicated in Angular("xhtml:" nescessário). Image of the code below.

Codigo no Angular

The result in Angular does not show the HTML element 'select'. But if you notice in the browser code 'select' is present. Screenshot below.

Resultado do Angular

What remains for the element to appear?

  • Friend what is your intention to use a select within a svg?

  • Build a component that has selectable options within it. It is not meant to be a rectangle in the final version if you would not use a <div>.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.