jak*_*ake 6 javascript handlebars.js ember.js ember-cli
每当我有一个使用@vars变量(即@ index,@ key,@ first,@ pop)的Handelbars模板时,我就会在ember-cli中收到编译错误.(有关每个帮助程序中这些@vars变量的文档,请参阅http://handlebarsjs.com/#iteration.)下面是一个使用ember-cli构建的简单应用程序,只包含两个添加到程序中的文件:routes/application.js和templates/application.hbs.在这篇文章的底部是ember-cli给出的编译错误消息的屏幕截图.我的代码中有错误吗?或者这是我应该在github上报告的错误@ https://github.com/stefanpenner/ember-cli?
路线/ application.js中
export default Ember.Route.extend({
model: function() {
return ['red', 'blue', 'green'];
}
});
Run Code Online (Sandbox Code Playgroud)
模板/ application.hbs
{{#each model}}
{{@index}}: {{this}}
{{/each}}
Run Code Online (Sandbox Code Playgroud)
ember-cli编译错误消息的屏幕截图:

以下是涉及的各种工具的版本:
这确实与 ember-cli 无关。Ember Handlebars 不支持@keyword 项目。
| 归档时间: |
|
| 查看次数: |
878 次 |
| 最近记录: |