Templates 不使用ember-1.6.1中的默认视图呈现索引

Templates 不使用ember-1.6.1中的默认视图呈现索引,templates,view,ember.js,handlebars.js,Templates,View,Ember.js,Handlebars.js,就像萨拉姆·瓦阿利库姆一样 每个人 我有一个index.html和 <script type="text/x-handlebars" data-template-name="application"> <div id="tabcontent" class="post" contenteditable="true"> {{outlet}} </div> </script> 在js

就像萨拉姆·瓦阿利库姆一样

每个人

我有一个index.html和

 <script type="text/x-handlebars" data-template-name="application">
        <div id="tabcontent" class="post" contenteditable="true">
            {{outlet}}
        </div>
    </script>  
在js/templates/welcomeTemplate.hbs中

 <div><p>Welcome</p></div> 
在控制台日志中,我得到

DEBUG: -------------------------------
DEBUG: Ember      : 1.6.1
DEBUG: Handlebars : 1.1.2
DEBUG: jQuery     : 1.10.2
DEBUG: -------------------------------
generated -> route:application Object { fullName="route:application"}
generated -> route:index Object { fullName="route:index"}
generated -> controller:application Object { fullName="controller:application"}
Rendering application with default view <(subclass of Ember.View):ember211> Object {
     fullName ="view:application"}
generated -> controller:index Object { fullName="controller:index"}
**Could not find "index" template or view. Nothing will be rendered Object {
     fullName="template:index"}**
log:
Transitioned into 'index'   
调试:------------------------------- 调试:余烬:1.6.1 调试:把手:1.1.2 调试:jQuery:1.10.2 调试:------------------------------- 已生成->路由:应用程序对象{fullName=“路由:应用程序”} 已生成->路由:索引对象{fullName=“路由:索引”} 已生成->控制器:应用程序对象{fullName=“控制器:应用程序”} 使用默认视图对象渲染应用程序{ fullName=“查看:应用程序”} 已生成->控制器:索引对象{fullName=“控制器:索引”} **找不到“索引”模板或视图。不会渲染任何对象{ fullName=“模板:索引”}** 日志: 转换为“索引” 请告诉我这里发生了什么,为什么我在/index.html浏览器中看不到“欢迎”字样?我将如何在/index.html浏览器中看到“欢迎”

多谢各位

致以最良好的问候
纳维

同时使用模板和模板名是没有意义的。此外,应用程序应为大写

App.ApplicationView = Ember.View.extend({
  template:Ember.Handlebars.compile('Hello {{name}}<br/>Name: {{input value=name}}')
});
App.ApplicationView=Ember.View.extend({
模板:Ember.handlebar.compile('Hello{{{name}}
name:{{{input value=name}}}}' });
Ember不会为您加载文件,因此声明hbs名称不会起任何作用,它只会将其视为您希望在页面中显示的普通字符串


您想告诉我如何加载和编译.hbs吗?我将应用程序改为大写,并删除了templatename,发现编译后的内容被添加到正文的最后一部分,而不是脚本。
DEBUG: -------------------------------
DEBUG: Ember      : 1.6.1
DEBUG: Handlebars : 1.1.2
DEBUG: jQuery     : 1.10.2
DEBUG: -------------------------------
generated -> route:application Object { fullName="route:application"}
generated -> route:index Object { fullName="route:index"}
generated -> controller:application Object { fullName="controller:application"}
Rendering application with default view <(subclass of Ember.View):ember211> Object {
     fullName ="view:application"}
generated -> controller:index Object { fullName="controller:index"}
**Could not find "index" template or view. Nothing will be rendered Object {
     fullName="template:index"}**
log:
Transitioned into 'index'   
App.ApplicationView = Ember.View.extend({
  template:Ember.Handlebars.compile('Hello {{name}}<br/>Name: {{input value=name}}')
});