Skip to content
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
@ivomju

Description

@ivomju

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);
    };

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions