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.

Stamped copies from transcluded directives don't inherit controllers in all cases #2533

Closed
@colinkahn

Description

@colinkahn

jsFiddle: http://jsfiddle.net/colinkahn/PL9gD/

The ngRepeat happens at priority: 1000, while the outerDirective happens before at a priority: 2000. You can see that the controller from the outerDirective is lost when the ngRepeat stamps out the new elements from the template. If the outerDirective had a priority that was lower than the ngRepeat, then the controller is added to stamped out elements and then (as expected) available to the innerDirective.

What this also means (but isn't shown here for brevity) is that if outerDirective essentially did what ngRepeat did (was transcluded, stamped out copies from an array), and had a controller, its controller would not be inherited to the innerDirective.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions