Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

Tab heading transclusion breaks directive 'require' property #2190

@Coridyn

Description

@Coridyn

I have found that the tabHeadingTransclude directive prevents required parent controllers from being passed through to directive link functions.

Here is an example showing the issue: http://plnkr.co/edit/GKUdOkkgsVKAGOLUpwBy?p=preview

I expect the showInheritedData directives inside the tab headings to show the text Inherited data= "this was inherited". However, they are showing Inherited data= "No inherited data available." because the directive link function doesn't receive the parent controller.

I think this problem occurs because the tabHeadingTransclude $watch expression executes after 'tab.$transcludeFn' method. This means the headingElement isn't on the DOM when Angular tries to check up the chain to resolve the directive's require attribute.

_Possible solution:_
I a fix for the tabHeadingTransclude directive that $compiles the headingElement content before appending it on the DOM: http://plnkr.co/edit/7BsaBEzMBUrNEt8yL2BN?p=preview

Is this an appropriate solution to this problem?

Thanks,
-Coridyn

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions