Empty scope spans created by ng-transclude
Please read this:
https://groups.google.com/forum/?fromgroups=#!topic/angular/5SaF085FANw
Bottom line is that ng-transclude in directive templates creates spans with class="ng-scope" which breaks the layout.
Same as #1059, I think.
fixed by https://github.com/jamessharp/angular.js/commit/0196bc871a7404173e21f59c77ab63f1d3a92091
@petebacondarwin
see http://plnkr.co/edit/xR4N5chhFyAvNubCJKJD?p=preview
It seems that ng-trasnclude is adding spans again in Angular 1.5.8. Works fine in 1.5.7
@stefanFruuu, can you provide a reproduction (e.g. a live demo using CodePen, Plnkr etc)?
@gkalpak https://plnkr.co/edit/YRqaDYsdRJUotYwgntqV

-
in case of 'simple' transclude ('transclude': true - plnkr above) spans are added in both 1.5.8 and 1.5.7
-
in case of multi-slot transclude with optional slot and default value spans are not added in 1.5.7 (https://plnkr.co/edit/kQhXKe0qA4Kg5aZ4zLVQ,
)but are added in 1.5.8 ( https://plnkr.co/edit/NiJOif6IEbZhWAhhNHZt
)
@stefanFruuu, indeed there is a difference. It has been introduced in 1.5.8 by 159a68e.
Previously, any fallback content was compiled as part of the parent template (even if that content would not be used). With 159a68e the fallback content will be compiled separately and only if necessary. A side effect of this separate compilation is that the fallback content is now treated as a template root and root text nodes are wrapped in <span>.
In 1.6.x there will be no extra <span> whatsoever, but this change is indeed undesirable for 1.5.x 😞
We'll look into it.
@stefanFruuu, could you create a separate issue to track that regression?
Thanks for explanation! I've created new issue: https://github.com/angular/angular.js/issues/15223