Geeks With Blogs

News Please visit me at my new blog!!

profile for Aligned at Stack Overflow, Q&A for professional and enthusiast programmers
"free in Christ Jesus from the law of sin and death." Romans 8:2 (ESV) Check out the Falling Plates video on YouTube.
more about the Gospel
And then listen to Francis Chan speaking at LifeLight in SD.



Programming and Learning from SD

I upgrade KnockoutJs through Nuget and started getting the error ‘Uncaught Error: You cannot apply bindings multiple times to the same element.’ when I used applyBindings after the main page load. I had some dynamically added DOM elements and re-applying bindings worked before. It always seemed like a workaround/hack, but now Knockout is telling me that I shouldn’t do it. The quick way to fix this is to use ko.cleanNode($(‘#id’) and this works. A different/possibly better way, as suggested by x0n might be to use templates and Knockout’s template binding (<script type=’text/html’>…</script>).

 

Thanks again to the StackOverflow community for quickly providing me with the solution. Check out my question for all the details.

Posted on Thursday, July 25, 2013 9:45 AM | Back to top


Comments on this post: KnockoutJS 2.3.0 - Uncaught Error: You cannot apply bindings multiple times to the same element.

# re: KnockoutJS 2.3.0 - Uncaught Error: You cannot apply bindings multiple times to the same element.
Requesting Gravatar...
Thanks, fixed me issue!
Left by Jon on Jul 03, 2014 8:18 AM

Your comment:
 (will show your gravatar)


Copyright © Aligned | Powered by: GeeksWithBlogs.net