我在SQL Server中存储了用MathML格式表示的方程式。我使用LINQ将方程式列表传递到UI。在UI中,我尝试使用
ng-repeat
来渲染这些MathML字符串,但它根本不起作用。
当我直接将MathML字符串放入任何div中时,它以正确的方式呈现方程式。
在ng-repeat中,它显示MathML格式。
MathML字符串如下:<math xmlns="http://www.w3.org/1998/Math/MathML">
<mroot>
<mn>4</mn>
<mn>2</mn>
</mroot>
<mo>+</mo>
<mfrac>
<mn>5</mn>
<mn>2</mn>
</mfrac>
<mo> </mo>
<mo>=</mo>
<mo> </mo>
<mfenced open="[" close="]">
<mtable>
<mtr>
<mtd>
<mn>2</mn>
</mtd>
<mtd>
<mn>2</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>8</mn>
</mtd>
<mtd>
<mn>4</mn>
</mtd>
</mtr>
</mtable>
</mfenced>
</math>