[英]How to use jqmath script in angular application?
I'm developing a Quiz application where i want to use jqMath script to display the maths equations. 我正在开发一个测验应用程序,我想在其中使用jqMath脚本显示数学方程式。 Problem is that there is syntax conflict whenever i use curly braces other than that all equation format are working fine. 问题是,每当我使用大括号时,语法表达式就会发生冲突,而不是所有方程式都可以正常工作。 I have tried interpolation provider but its still the same. 我已经尝试过插值提供程序,但仍然一样。 How can i solve this. 我该如何解决。 please help! 请帮忙!
Uncaught Error: Template parse errors:Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.) (" Invalid ICU message. Missing '}'. ("
import {parseMath} from 'jqmath'; export class A{ @ViewChild('exp') exp:ElementRef; func{ var exp = this.exp.nativeElement; parseMath(exp); } }
<div class="exp" #exp >$$x={-b±√{b^2-4ac}}/{2a}$$</div>
I haven't used angular, but it appears that it is triggered by double curly braces. 我还没有使用角度,但似乎是由双花括号触发的。 To avoid this, try putting a space between the two braces, ie { {
for {{
, or } }
for }}
. 为避免这种情况,请尝试在两个大括号之间放置一个空格,即{ {
表示{{
或} }
表示}}
。 jqMath will ignore the space inside mathematics. jqMath将忽略数学内部的空间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.