【发布时间】:2015-05-14 23:46:26
【问题描述】:
这是我的路线。当我使用来自另一个控制器的 trasitionToRoute 方法调用此路由时,我收到错误消息。
这是我的路由器:
App.AllSectionsRoute = Ember.Route.extend({
renderTemplate: function() {
//this._super();
this.render('fire', { outlet: 'fire', into: 'allSections' });
this.render('gas', { outlet: 'gas', into: 'allSections' });
}
});
这是我的模板:
<script type="text/x-handlebars" data-template-name="allSections">
<hr/>
<hr/>
<div class='outletArea'>
{{outlet "fire"}}
</div>
<hr/>
<div class='outletArea'>
{{outlet "gas"}}
</div>
</script>
如果我不调用this._super(controller, model); 语句,那时我会收到connectOutlet of undefined 的错误。
但是当我调用这个语句时,错误不会出现,但是我必须渲染到模板“allsections”中的“fire”和“gas”这样的额外模板没有被渲染。它将当前模板呈现为“allSections”,但那是已经打开的模板。
如果我错了,请建议我.....
【问题讨论】:
标签: ember.js ember-router