2
我试图将多个.hbs片段呈现到它们各自的插座中。但是,下面的renderTemplate不起作用:如何在一个模板文件中使用ember渲染多个插座2.3
renderTemplate: function() {
// default behavior, renders the home template
this.render();
this.render('hero', { // render the `hero` template
outlet: 'hero' // using the outlet named `hero`
});
},
所关注的模板文件看起来是这样的:在一次:
{{outlet 'hero'}}
{{outlet}}
这实际上使默认模板(这是该指数的路线)的两倍英雄的出路,一次在正规渠道。
这似乎在ember1.7中工作,即使英雄插座包含在application.hbs模板中。与ember2.3不太一样。
我该如何做这项工作?
似乎工作http://emberjs.jsbin.com/lequhe/2/edit?html,js,output – blessenm
^我复制并粘贴你的代码(在适当的地方),它现在似乎工作。我不确定我到底做错了什么,但现在它正在工作。也许这是我造成的某种构建问题。 – Darshan