我有以下容器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