This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Ng-switch commentary has unnecessary white space #14549
Closed
Description
When creating ng-switch-when end commentary, because no comment is passed an unnecessary white space is generated.
Before:
<!-- end ngSwitchWhen: -->
Now:
<!-- end ngSwitchWhen: -->
To prevent that we could do something like this:
compile.$$createComment = function(directiveName, comment) {
var content = '';
if (debugInfoEnabled) {
content = ' ';
content += (directiveName || '');
content += ':';
content += comment ? ' ' + comment : '';
content += ' ';
}
return window.document.createComment(content);
};