I am having trouble putting binding svg text elements in razor. If I do this
<svg><text x="1">hello world</text></svg>it works fine - but if I do this:
<svg> @for (var i=0;i<10;i++) {<text x="1">hello world</text> }</svg>it gives me an error saying text elements can't contain attributes - ie clearly it's forgotten that it's inside svg.
I can sort of hack around it by going
<svg> @for (var i=0;i<10;i++) {<text><text x="1">hello world</text></text> }</svg>which works but is ugly as - anyone know what the problem is and how to fix it?