Unbind view model from view in knockout

前端 未结 3 1393
無奈伤痛
無奈伤痛 2020-12-29 18:58

I\'m looking for unbind functionality in knockout. Unfortunately googling and looking through questions asked here didn\'t give me any useful information on the topic.

3条回答
  •  天命终不由人
    2020-12-29 19:46

    You can use ko.cleanNode to remove the bindings. You can apply this to specific DOM elements or higher level DOM containers (eg. the entire form).

    See http://jsfiddle.net/KRyXR/157/ for an example.

提交回复
热议问题