如何重新渲染 mathquill.js?
How do I rerender mathquill.js?
问题是,我正在使用 angularjs ng-include 加载部分,而 mathquill 框在部分中,如果我输入
<script src="/MathQuill/mathquill.js"></script>
在局部视图中,它工作正常,但我会收到警告:
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
如果我把
<script src="/MathQuill/mathquill.js"></script>
在主视图中,加载partial后,mathquill根本不起作用,请问这是渲染问题吗?如何重新渲染局部视图?或者如果不是,我该如何解决?
在 mathquill 网站上找到:
请注意,对于文档就绪的 HTML DOM 中不存在的动态创建元素,您需要在插入可见 [= 后调用我们的 jQuery 插件15=] DOM:
$('<span>x^2</span>').appendTo('body').mathquill() or .mathquill('editable')
问题是,我正在使用 angularjs ng-include 加载部分,而 mathquill 框在部分中,如果我输入
<script src="/MathQuill/mathquill.js"></script>
在局部视图中,它工作正常,但我会收到警告:
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
如果我把
<script src="/MathQuill/mathquill.js"></script>
在主视图中,加载partial后,mathquill根本不起作用,请问这是渲染问题吗?如何重新渲染局部视图?或者如果不是,我该如何解决?
在 mathquill 网站上找到:
请注意,对于文档就绪的 HTML DOM 中不存在的动态创建元素,您需要在插入可见 [= 后调用我们的 jQuery 插件15=] DOM:
$('<span>x^2</span>').appendTo('body').mathquill() or .mathquill('editable')