我不明白为什么顶部绑定不起作用,但“with”语句确实有效。这个Knockout绑定为什么不起作用?
I have set up the question on JSFiddle here。
Why does this not appear when it is bound to Info.Title?
<div data-bind="text: Info.Title"></div>
<hr/>
But this does when I use the with statement?
<div data-bind="with: Info">
<div>
<h1 data-bind="text: Title"></h1>
</div>
</div>
请问您可以提供分支,更新版本的答案(答案中的JS小提琴链接是我的原始代码),谢谢 – Rodney 2013-05-11 02:18:13
糟糕,当然:http://jsfiddle.net/PQkJb/ – Christoffer 2013-05-11 02:22:23