Expand Minimize

Disable comment directives

Disable comment directives to improve AngularJS compiler performance

CheckId NG1120102
TypeName DisableCommentDirectives
Severity CriticalWarning
Type AngularJS Module

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

You can disable support for comment 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.