Expand Minimize

Disable CSS class directives

Disable CSS class directives to improve AngularJS compiler performance

CheckId NG1120103
TypeName DisableCssClassDirectives
Severity CriticalWarning
Type AngularJS Module

By default AngularJS searches through CSS classes for directives. If you don't use CSS class directives and you don't use third party libraries that use CSS class directives, you can disable support for CSS class directives. This will improve the performance of the AngularJS compiler.

You can disable support for CSS class directives using:

myApp.config(['$compileProvider', function ($compileProvider) {

Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.