Is there a way to prevent Angular from creating HTML helper comments? For example,
<div ng-include="myTemplate"></div>
Converts to something like
<div ng-include="myTemplate"></div>
How to stop this? I looked at the source of Angular, and I saw that these โhelpersโ are generated by the unconditional document.createComment inside almost every directive, so I think there is no way to stop them all at once using the configuration settings on the provider or something like that. But maybe there are some custom Angular assemblies without "helpers"? I believe that I could write a Yeoman / Grunt task to remove / comment on .createComment-s from an Angular source whenever I create a new project. Or maybe you guys know about a violin that already does this? And also this raises my last question: Are these comments somehow important for the normal functioning of Angular? And if I delete them, will it cause some kind of instability in my application? Should I just rewrite CSS and "handle it"?
javascript angularjs
user3089094
source share