JSFiddle source
我使用hello.bind('Hi!!!')
但是在方法hello中,我得到的是视图模型对象,而不是字符串值。你知道为什么吗?
发布于 2012-10-09 22:03:26
将您的标记更改为:
<button data-bind="click: hello.bind($data, 'Hi!!!')">Say hello</button>从文档中:
有关bind的更多信息,请访问Mozilla。
https://stackoverflow.com/questions/12801789
复制相似问题