Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

knockoutjs foreach not working in IE 7 & IE 8

Tags:

knockout.js

I am new to working with knockout and i have worked on sample application that displays array object in a tabular format using foreach. Data is getting rendered correctly in IE9, firefox, chrome, safari browsers but data is not getting rendered in IE 7 & IE 8 browsers. As per knockoutjs site, they claim knockout works in IE 6+ browsers.

http://jsfiddle.net/chiru_neeru/sbbNu/8/

FYI: I have referenced 2.0.0 knockout.js & jquery1.7.1.js files in my sample application. My sample code in the above jsfiddle url also not getting rendered when i run it but the same code is working correctly in my sample application.

Can anybody guide me how to make the above sample application works in IE 7 & IE 8 browsers? I followed the instructions given in Knockoutjs: Not working in IE7 but it is not working in my sample application scenario.

Thanks

like image 933
Niranjan Avatar asked Dec 30 '25 01:12

Niranjan


1 Answers

Make sure that you open and close all of your span tags properly. They need opening and closing tags like: <span data-bind="text:'blah'"></span>

http://jsfiddle.net/rniemeyer/aq9mE/

like image 120
RP Niemeyer Avatar answered Dec 31 '25 19:12

RP Niemeyer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!