Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

nested ng-transcludes with isolate scopes broken #6435

Closed
reinerp opened this issue Feb 24, 2014 · 6 comments
Closed

nested ng-transcludes with isolate scopes broken #6435

reinerp opened this issue Feb 24, 2014 · 6 comments

Comments

@reinerp
Copy link

reinerp commented Feb 24, 2014

See http://jsfiddle.net/c7UvM/10/. I have two directives, <outer> and <inner>, each of which uses isolate scopes and ng-transclude. The template for <outer> contains <inner><div ng-transclude></div></inner>. This nested use of ng-transclude causes the scope to be wired up wrongly.

What's my use case? Currently, my <inner> directive is responsible for creating a stylized link, and my <outer> directive uses that stylized link to show a specific piece of text. These are completely separate responsibilities, so I'd like to keep them separate.

@julien-gm
Copy link

I think I have a similar issue...
Here is the fiddle http://jsfiddle.net/a47Rz/2/
You can see that if you remove the ng-if, it's working fine. The error seems to occur on the $transclude of the ngIfDirective...

Thanks for you help.

@sheab
Copy link

sheab commented Mar 20, 2014

I'm having the same issue

@Xesued
Copy link

Xesued commented Apr 4, 2014

+1

@petebacondarwin
Copy link
Member

Possibly fixed by #7387

@odebreu
Copy link

odebreu commented May 28, 2014

I tried to make a similar example work with the angularjs 1.3.0-beta.10 (which should include the fix #7387) but it seems that the issue is still there.
Here is the example: http://plnkr.co/edit/0hFFHknDps2krtK1D9ud?p=preview

@Narretz Narretz added this to the 1.3.0 milestone Jun 21, 2014
@rodyhaddad
Copy link
Contributor

Updating to 1.3.0-beta.13 makes all 3 jsfiddles/plunkr work as expected (1, 2, 3)

Closing this as it seems fixed. Let me know if I missed anything to re-open it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants