我使用https://medium.com/kongsberg-digital/how-to-render-mathml-in-browser-using-angular-and-mathjax-3-along-with-lazy-loading-83f791911cfd將 mathjax 添加到我的角度應用程式,并讓它與 asciimath 格式一起使用。我的問題是當我嘗試在輸入欄位中輸入文字時。
作業-
應用程式.ts
expr='`a=b`'
應用程式.html
<p [appMath]="expr"></p>
不作業-
應用程式.ts
應用程式.html
<p [appMath]="`a=b`"></p>
我寧愿不必為我擁有的每個運算式都有一個變數。有任何想法嗎?謝謝 :)
uj5u.com熱心網友回復:
那是因為 ` 在你的字串中。所以你的第二個需要是:
<p [appMath]="'`a=b`'"></p>
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/416726.html
標籤:
