KnockoutJs v2.3.0 : Error You cannot apply bindings multiple times to the same element

后端 未结 13 1161
闹比i
闹比i 2020-12-04 17:38

I\'ve just upgraded to 2.3.0 and now I\'m getting the error

You cannot apply bindings multiple times to the same element.

that

13条回答
  •  日久生厌
    2020-12-04 17:45

    ko.cleanNode($("#modalPartialView")[0]);
    ko.applyBindings(vm, $("#modalPartialView")[0]);
    

    works for me, but as others note, the cleanNode is internal ko function, so there is probably a better way.

提交回复
热议问题