【发布时间】:2013-04-01 16:31:20
【问题描述】:
我正在尝试使用guard-handlebars 预编译我的车把模板(以避免将它们全部包含在我的 index.html 中,这感觉不太理想......)。预编译运行良好,Ember 接受了模板在我将其注入 Ember.TEMPLATES 时接受的事实,如下所示:
Ember.TEMPLATES['application'] = Handlebars.templates['application']
但是,它不起作用。我得到一个这样的例外:
Could not find property 'outlet'
...在 Handlebars helperMissing 方法中。似乎 Ember 使用了一些默认 Handlebars 东西的猴子补丁,据说添加了对 {{outlet}} 助手和其他人的支持。但是我的模板似乎没有使用这些插座。你如何解决这个问题?
我正在使用通过 NPM 安装的车把编译器来编译模板。
【问题讨论】:
标签: ember.js