我正在开发一个测验应用程序,我想在其中使用 jqMath 脚本来显示数学方程式。问题是每当我使用大括号时都会出现语法冲突,而不是所有方程格式都可以正常工作。我已经尝试过插值提供程序,但它仍然是一样的。我该如何解决这个问题。请帮忙!
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>