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

后端 未结 13 1163
闹比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 18:12

    i had the same problem and I solved it.

    var vm = new MessagesViewModel()
    ko.applyBindings(vm)
    
    function ShowMessagesList() {
       vm.getData("MyParams")
    }
    
    setInterval(ShowMessagesList, 10000)
    

提交回复
热议问题