Ember.js emberjs模板编译不';我不在rc1工作

Ember.js emberjs模板编译不';我不在rc1工作,ember.js,Ember.js,我有 还有一个模板,比如 Esploreo.TE.Views.ItemView = Ember.View.extend({ elementId : "item", templateName : 'itemTemplate' }); 但它不起作用(EmberJS1.0.0-RC.1)。此功能已从此版本中删除?这是一种使用Ember的奇特方式!要回答您的问题,您需要在.create()的末尾添加.append(),如下所示: App.ItemView.create().append

我有

还有一个模板,比如

Esploreo.TE.Views.ItemView = Ember.View.extend({
    elementId : "item",
    templateName : 'itemTemplate'
});

但它不起作用(EmberJS1.0.0-RC.1)。此功能已从此版本中删除?

这是一种使用Ember的奇特方式!要回答您的问题,您需要在
.create()
的末尾添加
.append()
,如下所示:

App.ItemView.create().append()

必修中学:


虽然我不知道您在这方面的使用情况,但我不能强调这似乎有点太奇怪,几乎是对Ember的错误使用。

我想使用这种解决方案,因为我不想只为一个模板创建html文件(或使用index.html)。
<script type="text/x-handlebars" data-template-name="itemTemplate">
  content of templat
</script>
Esploreo.TE.Views.ItemView = Ember.View.extend({
    elementId : "item",
    template: Em.Handlebars.compile('content of template'),
});