0
我有一個集合觀點如下:如何在車把中引用childview?
Ember.Widget.ParentView = Ember.CollectionView.extend({
content: ['childView1', 'childView2'],
fnameBinding: ChildView1.fname,
lnameBinding: ChildView1.lname,
ChildView1: Ember.View.extend({
templateName: 'ChildView1',
fname: 'David',
lname: 'Johnson',
}),
ChildView2: Ember.View.extend({
fnameBinding: '_parentView.fname',
lnameBinding: '_parentView.lname',
})
});
如果我想顯示ChildView1.handlebar的名字,我應該如何引用FNAME?以下不起作用:
<script type="text/x-handlebars" name="ChildView1">
{{fname}}{{lname}}
</script>
感謝您的幫助!