Angular JS ng-style and Internet Explorer 8

I have a problem that I cannot understand.

In IE8, the ng-style directive doesn't work at all. I use it to set the width of an element. It works great in all other browsers.

In IE8, when testing an element using the crappy tool F12, the style property is completely missing.

Can anyone tell me if there is a workaround? The version of angularjs that I am using is a stable version at the time of writing (1.0.2)

thanks

+4
source share
1 answer

Well, I found why {{}} did not work in IE7: you have to polyfill JSON.stringify, because for displaying objects and IE7 it is not there if you show the line where it works:

http://jsfiddle.net/NLrYx/3/

Additional IE7 compatibility information: http://docs.angularjs.org/guide/ie

JSON script: https://github.com/douglascrockford/JSON-js/blob/master/json2.js

+2
source

Source: https://habr.com/ru/post/1436835/


All Articles