knockoutjs - bindings with parameters triggered on load

后端 未结 3 1020
你的背包
你的背包 2021-01-31 13:20

I\'ve been doing a lot of knockoutjs lately, and I came across a strange occurence.

As you can see in this fiddle http://jsfiddle.net/hqXjv/ when you set up a binding to

3条回答
  •  鱼传尺愫
    2021-01-31 14:01

    The following executed the click function on load

    click: clickSpan()
    

    removing the brackets as below, the function was not executed onload

    click: clickSpan
    

    (this is explained in note 2 above but it was in cryptic form :-)

提交回复
热议问题