0
工作,我有emberjs模板编译不RC1
Esploreo.TE.Views.ItemView = Ember.View.extend({
elementId : "item",
templateName : 'itemTemplate'
});
和像
<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'),
});
,但它不工作(emberjs 1.0.0-RC.1)。此功能已从此版本中删除?
我想使用这种类型的解决方案,因为我不想为一个模板创建一个html文件(或使用index.html)。 – RedBass 2013-02-21 12:57:18