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-transclude adds span element with ng-scope class #15223

Closed
@piotrppe

Description

@piotrppe

Note: for support questions, please use one of these channels: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.

Do you want to request a feature or report a bug?
report a bug

What is the current behavior?
ng-transclude adds empty span for "basic" transclusion (#1293 regression) and for multi-slot transclusion in case of using fallback content (introduced in 1.5.8 by 159a68e)

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (template: http://plnkr.co/edit/tpl:yBpEi4).
Basic transclusion:
https://plnkr.co/edit/YRqaDYsdRJUotYwgntqV
image

Multi-slot with fallback content in 1.5.8:
https://plnkr.co/edit/NiJOif6IEbZhWAhhNHZt
image

For comparison - same case as above in 1.5.7:
https://plnkr.co/edit/kQhXKe0qA4Kg5aZ4zLVQ,
image

What is the expected behavior?
In my opinion ng-transclude should not add additional span elements (no matter which mode is being used - "basic" or "multi-slot")

What is the motivation / use case for changing the behavior?
Additional span introduced in 1.5.8 by 159a68e is breaking layout in our application.

Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
Angular 1.5.7, 1.5.8 - "Basic" transclusion. I'm pretty sure it worked properly in 1.4.X (?)
Angular 1.5.8 - Multi-slot transclusion

Other information (e.g. stacktraces, related issues, suggestions how to fix)
#1293 - related issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions