1
我ObjectController:如何顯示ObjectController的「內容」?
App.TestController = Ember.ObjectController.extend
content: null
App.testController = App.TestController.create()
App.testController.set("content", Ember.Object.create({ question: "Question?" }))
console.log App.testController.get("question")
我的看法:
{{#view App.QuizView controller="App.testController"}}
<div>"{{question}}"</div>
{{/view}}
在我的控制檯,我得到:
Question?
不過我的看法是空的:
""
什麼上午我做錯了?
太快了!太好了!謝謝! :-) – kraftwer1
如果解決方案適合您,您可以接受答案:) – louiscoquio
對不起,StackOverflow說我必須等幾分鐘才能回答。你太快了! – kraftwer1