Knockout js version 2.3.0 Uncaught Error: You cannot apply bindings multiple times to the same element.

0 votes
asked Aug 6, 2014 in Other by Priya Roy (122 points)

Hi

I am getting a new error as below. It was working fine and started happening after we upgrade from 2.2.1 to 2.3.0

Uncaught Error: You cannot apply bindings multiple times to the same element.

 ko.applyBindings(viewModel, document.getElementById('mydiv'));
Share

1 Answer

0 votes
answered Mar 27, 2015 by Nesh Qingshan Ak
selected Jul 23, 2015 by administrator
 
Best answer

try this:

var elem = document.getElementById('mydiv');
ko.cleanNode(elem);
ko.applyBindings(viewModel, elem);

Your answer

Preview

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
site design / logo / content © 2013 - 2015 pinfaq.com
...