This expression for binding knockout 2.1 works fine in Firefox and IE9, but it fails in IE9 compatibility mode with the error "Expected identifier, string or number":
<div data-bind="template: { if: myDataModel, data: myDataModel, afterRender: setup(myDataModel) }">
I found the actual place in the debugger, this is a line of code (knockout-2.1.0.debug.js):
return new Function("sc", functionBody)
functionBody is the string equal to the expression above. I tried to play with spaces and carriage returns - nothing helps, the same results: it works as expected with any browser other than IE9 compatibility mode
Any suggestions?
source share