未捕获错误:在未加载模板编译器的情况下,无法调用“compile”.请在调用“compile”之前加载“ember te
Uncaught Error: Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`
im是ember.js框架的新成员,使用ruby on rails和ember.debug.js-v1.10.1(最新版本)。我一直在网上读到ember更改了这个最新的补丁,但我不知道如何解决我的问题:
Uncaught Error: Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`.
有人能帮我推动编译器正常运行吗?我希望我知道我的项目中的哪些代码片段将有助于确定答案。。。
这篇文章可能会帮助你:
http://emberjs.com/blog/2015/02/05/compiling-templates-in-1-10-0.html
如果你不使用ember-cli,你的HTML应该是这样的:
<script src="assets/ember-template-compiler.js"></script>
<script src="assets/ember.debug.js"></script>
如果您使用的是ember-cli,那么您的模板应该是预编译的,您不应该有这个问题。
我们需要在应用程序中包含ember-template-compiler.js。我认为ember rails默认情况下不包括这一点。
将其添加到您的app/assets/javascripts/application.js 中
//= require ember-template-compiler
相关文章:
- 如何使jQuery插件函数可调用以供独立使用,而不在集合上操作
- D3在一个调用中绘制不同的SVG形状,没有可见性
- 如何从Java/scala调用js美化程序
- 如何调用这个匿名 JavaScript 函数
- 如何从模块链中调用函数.导出到节点中
- 我需要从php调用javascript或jquery
- Chrome开发工具(如何知道我在调用哪个javascript对象)
- 单击按钮后如何逐个调用分区,上一个分区将隐藏
- 另一个ajax调用中的Jquery ajax调用在for循环中没有按预期工作
- Twitter Bootstrap typeahead:使用“this”获取上下文/调用元素
- node.js:setInterval()正在跳过调用
- 如何在单击复选框后调用控制器方法
- 如何在JQuery函数中定义一个值,然后调用另一个函数并使用该值
- 使用Google Visualization动态调用构造函数
- Ember 1.10-升级错误-模板必须是一个函数.您是想调用Ember.Handlebars.compile(“..”
- 未捕获错误:在未加载模板编译器的情况下,无法调用“compile”.请在调用“compile”之前加载“ember te
- 当使用$compile以编程方式创建指令时,如何调用link函数?
- 从手动$compile调用中获取控制器
- Angular-bootstrap -反复调用带有bootstrap工具提示的$compile会导致运行缓慢
- 在angular中调用$compile绑定动态HTML后的ng-repeat问题