未捕获的错误:如果没有加载模板编译器,则无法调用`compile`。 请在调用`compile`之前加载`ember-template-compiler.js`
我是ember.js框架的新手,并在rails和ember.debug.js -v 1.10.1(最新版本)上使用ruby。 我一直在网上看到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应该是这样的:
如果您使用的是ember-cli,那么您的模板应该是预编译的,您不应该遇到这个问题。
我们需要在我们的应用程序中包含ember-template-compiler.js。 我认为ember-rails默认不包括这个。
在app / assets / javascripts / application.js中添加此项
//= require ember-template-compiler
- 如何在ember中链接到特定的rails API路由和服务器生成的内容?
- 具有嵌入式ID和侧载的Ember-Data和Active Model Serializer的has_many配置
- Ember Data属于协会(JSON格式?)
- 如何使用ember-rails gem为HandlebarsJS模板指定备用目录?
- Active Model Serializer和Pundit在显示CRUD操作期间删除记录
- 关于emberjs中命名约定的困惑
- Ember.js基于会话cookie的Rails和设计认证
- 如何使用Ember Data&Rails在单个Ember.js表单中保留hasMany关联?
- Ember.js中的非crud rails操作