Open Coridyn opened 10 years ago
Can you confirm this is still an issue with UI Bootstrap 0.13 and Angular 1.3?
Hi, sorry about the delay in checking this.
Yes, I've confirmed that the issue still occurs in Angular 1.3 (and 1.4.1) and UI Bootstrap 0.13.
Here is the updated plunker I used to check the issue: http://plnkr.co/edit/otcWoroTMmVrj6IBZRLY?p=preview
How the transclusion happens currently with tabs needs to be refactored - it is not properly handled.
@segevofer, please do not only add +1
to issues with no other comments. doing so adds no intrinsic value and serves to only clutter up the thread.
Just noting, we now have a path to fix this, but this requires breaking all support for angular prior to 1.5. Scheduling this for 3.0.0.
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 textInherited data= "this was inherited"
. However, they are showingInherited 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'srequire
attribute._Possible solution:_ I a fix for the
tabHeadingTransclude
directive that$compile
s the headingElement content before appending it on the DOM: http://plnkr.co/edit/7BsaBEzMBUrNEt8yL2BN?p=previewIs this an appropriate solution to this problem?
Thanks, -Coridyn