未捕获错误:无法调用`compile`而不加载模板编译器。在调用`compile`之前,请加载`ember-template-compiler.js` [英] Uncaught Error: Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`

查看:195
本文介绍了未捕获错误:无法调用`compile`而不加载模板编译器。在调用`compile`之前,请加载`ember-template-compiler.js`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在新的ember.js框架下,使用ruby在rails和ember.debug.js -v 1.10.1(最新版本)。我一直在网上阅读,这个ember改变了这个最新的补丁,但是我无法弄清楚如何解决我的问题:

 未捕获错误:不能调用`compile`而不加载模板编译器。在调用`compile`之前,请加载`ember-template-compiler.js`。 

有人可以推动我朝着使编译器正常运行的方向吗?我希望我知道我的项目中的代码段有助于确定答案...

解决方案

这篇文章可能会帮助你: / p>

http://emberjs.com/blog/2015/02/05/compiling-templates-in-1-10-0.html



如果您不使用ember-cli,您的HTML应该如下所示:

 < script src = 资产/烬-模板compiler.js >< /脚本> 
< script src =assets / ember.debug.js>< / script>

如果您使用ember-cli,您的模板应该是预编译的,你不应该有这个问题。


im new to the ember.js framework and using ruby on rails and ember.debug.js -v 1.10.1(latest release). I have been reading online that ember changed this latest patch but i cant figure out how to fix my problem of:

Uncaught Error: Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`.

Could someone please nudge me in the direction to getting my compiler to run properly? i wish i knew what code snippets from my project would help determine the answer...

解决方案

This post may help you:

http://emberjs.com/blog/2015/02/05/compiling-templates-in-1-10-0.html

If you're not using ember-cli - your HTML should look something like this:

<script src="assets/ember-template-compiler.js"></script>
<script src="assets/ember.debug.js"></script>

If you are using ember-cli your templates should be precompiled and you shouldn't be having that problem.

这篇关于未捕获错误:无法调用`compile`而不加载模板编译器。在调用`compile`之前,请加载`ember-template-compiler.js`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆