-
Notifications
You must be signed in to change notification settings - Fork 27.4k
ngClass not rendering correctly in Internet Explorer 7 when $sceProvider.enabled(false); #4974
Comments
Could be a number of reasons this breaks in IE7, most likely changes to jqLite. However, IE7 is not supported or tested against. If you absolutely require IE7 support your best luck is using an older version of Angular that coincidentally works with old IE! |
Thanks for the reply. I'm really struggling to find in black and white weather angular doesn't work on Internet Explorer 7. http://docs.angularjs.org/guide/ie makes reference to running on IE v8.0 or earlier. If seemed OK until I upgraded to the latest version. IE7 is a deal breaker for this particular task unfortunately. |
The project currently supports and will attempt to fix bugs for IE8 and IE7 and below are not officially supported but a subset of the AngularJS It is very unlikely that issues specific to IE7 will be given any time by
|
@petebacondarwin - could you please update http://docs.angularjs.org/guide/ie with your comment as I think this will send a much clearer message than what is currently there. There are other issues with IE7 and ng 1.2.x including ngRepeat, ngHide, ngShow, ngIf, expressions in ngClass and now this. These are just the ones I have come across in the last few days. I would be very surprised if that was the complete list. |
Added text from angular#4974 where petedarwinbacon responded to an IE7 issue.
I thank the gods every day i do not have to support ie7. This was only a month ago, i feel bad for him, my condolences. |
@j-walker23 - no end of IE7 until at least mid 2014, maybe later. Craziness. |
Very sad, i contemplate another career any time i am told i have to support ie7 when i am just about done with the app. |
Added text from angular#4974 Closes angular#5070
Added text from angular#4974 Closes angular#5070
I thing i´ve made a fix for this little anoying bug.. here it is (use it IE7 only to overcome performance issues) //(use it IE7 only to overcome performance issues)
myApp.directive('ngClassFix', function($parse){
return {
restrict:'A',
scope: true,
link: function(scope, element, attrs){
var str = attrs["ngClass"];
scope.$parent.$watch(function(){
var output = null;
output = $parse(str)(scope);
return output;
},function(newValue, oldValue){
//alert(newValue);
angular.element(element).removeClass(oldValue).addClass(newValue).addClass('ng-scope');
});
}
}
}); and then in element you have to use <div ng-class="myexpression" ng-class-fix></div> hope it helps anyone ;) |
@lelis718 thanks for doing this. In IE7 I'm getting the error: 10 $digest() iterations reached. Aborting!. |
Hello @llozano , |
Hi @lelis718, I'm using an angular expression. Here is an example ` Where $scope.appTab.Pies is another boolean. Thanks again. |
Helo @llozano try to encapsulate this ng-class expression in a function of your scope see if that works Something like
And then in scope you define getCoolClass |
Same issue here. I've found an answer at stackoverflow for this issue which link back to #3633
Now, I have to put
as the first child element in |
i also have this problem. http://stackoverflow.com/questions/22958807/angular-not-working-in-ie8-document-mode-7 |
@wurongle You are my hero! |
Added text from angular/angular.js#4974 Closes #5070
Hi there. I think there might be a issue with Internet Explorer 7. (Fine in 10,9,and 8)
I have set: $sceProvider.enabled(false); and have the correct doc type: <!doctype html>
The problem seems to be that the ng-class directive is not rendering the class styles onto the div correctly. The class ('classname') gets injected into the markup, however the browser fails to parse and repaint the new added styles of 'classname'.
The problem affects > 1.2.0rc1 including current 1.2.0
Tried everything! I'm convinced its do with with $sce somewhere ?
The text was updated successfully, but these errors were encountered: