angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

ng-cloak, ngCloak do not work in IE

Open dbrunner opened this issue 13 years ago • 4 comments

Here is some more data on the ng-cloak / ngCloak problem in Internet Explorer (including IE8, IE9, IE10).

The problem appears to occur in IE9 and IE10. IE10 is not a legacy browser, so the Angular docs for ng-cloak do not sufficiently address this issue.

Also, adding the ngCloak class does not appear to fix the problem in IE8 or IE10.

Adding "style='display: none;'" to the element does fix the problem in IE8 and IE10.

Imported from discussion on mailing list: https://groups.google.com/forum/?hl=en-US&fromgroups=#!topic/angular/5ZMPyg5qtEM

dbrunner avatar Feb 02 '13 20:02 dbrunner

I can't reproduce the problem with IE8. Please reopen if you can provide more info and a testcase.

my test: http://jsfiddle.net/T28uf/1/ according to MDN even IE7 supports css attribute selectors, so even IE7 (but not IE6) should work with ng-cloak attribute without the css class workaround. https://developer.mozilla.org/en-US/docs/CSS/Attribute_selectors

IgorMinar avatar Feb 03 '13 04:02 IgorMinar

Doesn't work for me either on IE8. Didn't test or IE versions. @dbrunner 's fix - "display: none" worked.

ashitvora-zz avatar Oct 05 '13 11:10 ashitvora-zz

Please provide more info or code.

christinechen90 avatar Nov 12 '13 09:11 christinechen90

This helped me: https://stackoverflow.com/questions/27802094/ng-cloak-has-not-effect-whatsoever-on-blinking-angular-code

Spoiler: add the following code, because "If your angular.js file is in any way async, then it doesn't have a chance to load and add the styles before the page finishes rendering, and thus you'll see the curly brackets. That's why you must inline that ngcloak style at the top of the page".

[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }

globad avatar Aug 15 '21 04:08 globad