Angular 1.3 introduced a new debugInfoEnabled()
method that can provide a boost in performance if called with false
in the application config function:
myApp.config(['$compileProvider', function ($compileProvider) {
$compileProvider.debugInfoEnabled(false);
}]);
Also, Angular 1.3 dropped IE8 support. And this is a problem for me, my application have to run on IE8. Hence, I cannot upgrade to angular 1.3 and have to live with 1.2.
Is there a way to achieve the same functionality with angular 1.2?
In particular, at least a part of what debugInfoEnabled()
does:
- prevent creation of
ng-scope
/ng-isolated-scope
CSS classes while creating new scopes - do not attach binding data and ng-class CSS class to elements with ngBind, ngBindHtml or {{...}} interpolations
As one possible option, I can fork the angularjs repository and backport the feature back to 1.2. Then, use the fork maintaining updates from the upstream.
Would appreciate any pointers.
You can try disable it by mentioning
$logProvider.debugEnabled(true);
inside your angular configuration. In order to get effect ofdebugEnabled
setting, You need ensure that while doing log use$log
provider.Sample Code
Here is Fiddle
Hopefully this will help you.
Use the underlying DOM
setAttribute
method to prevent the default behavior. I've edited the plunker in the other answer:http://plnkr.co/edit/cMar0d9IbalFxDA6AU3e?p=preview
to do the following:
setAttribute
prototype methodng
debug attributesng
debug attributesUse it as follows:
Replace
HTMLElement
withElement
for IE8.References
CSS classes used by angular
Prototypes, Constructor Functions, and Taxidermy
AngularJS IE8 Shim
AngularJS IE8 Builds
Document Object Model Prototypes
Document Object Model Prototypes, Part 2: Accessor (getter/setter) Support
What's New in Internet Explorer 9