我有以下容器Emberjs子视图结合
script type: 'text/x-handlebars', 'data-template-name': 'application', ->
text '''
{{outlet}}
'''
随后这一观点被连接到它
script type: 'text/x-handlebars', 'data-template-name': 'index', ->
text '''
{{view App.SignUpView}}
'''
实际视图
App.SignUpView = Ember.View.extend
templateName: 'signup'
isValid: true
email: ''
password: ''
模板:
script type: 'text/x-handlebars', 'data-template-name': 'signup', ->
text '''
is valid: {{isValid}}
'''
如何将isValid字段绑定到视图?它是未定义的。这在某种程度上与父视图中的“出口”有关吗?
此示例Binding child views and collections within an outlet in emberjs显示了如何将任意对象绑定到视图。
相关的问题在这里:http://stackoverflow.com/questions/11818116/ember-js-handlebars-displays-nothing – 2012-08-06 21:15:34