You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/content/guide/production.ngdoc
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -77,16 +77,23 @@ For more information, see the
77
77
78
78
## Disable comment and css class directives
79
79
80
-
By default AngularJS compiles and executes all directives inside comments and element classes. In order to perform this task, angular compiler must look for directives by:
80
+
By default AngularJS compiles and executes all directives inside comments and element classes.
81
+
In order to perform this task, angular compiler must look for directives by:
81
82
82
83
- Parse all your application element classes.
83
84
84
85
- Parse all your application html comments.
85
86
86
-
Nowadays most of the Angular projects are using only element and attribute directives, and in such projects there is no need to compile comments and classes.
87
+
Nowadays most of the Angular projects are using only element and attribute directives,
88
+
and in such projects there is no need to compile comments and classes.
87
89
88
-
If you are sure that your project only use element directives and attribute directives, and you are not using any 3rd part library that uses directives inside element classes or html comments, you can disable.
89
-
This results in a compilation performance gain, as the compiler does not have to check comments and element classes looking for directives.
90
+
If you are sure that your project only uses element and attribute directives,
91
+
and you are not using any 3rd part library that uses
92
+
directives inside element classes or html comments,
93
+
you can disable the compilation of directives on element classes and comments
94
+
for the whole application.
95
+
This results in a compilation performance gain,
96
+
as the compiler does not have to check comments and element classes looking for directives.
90
97
91
98
To disable comment and css class directives use the `$compileProvider`:
For more see the docs pages on {@link ng.$compileProvider#commentDirectivesEnabled `$compileProvider.commentDirectivesEnabled`} and {@link ng.$compileProvider#cssClassDirectivesEnabled `$compileProvider.cssClassDirectivesEnabled`}.
0 commit comments