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

Directive template: "[ng-show] > [ng-if] > [ng-transclude]" throws exception. Bug? #7240

Closed
Wizek opened this issue Apr 24, 2014 · 5 comments

Comments

@Wizek
Copy link

Wizek commented Apr 24, 2014

http://jsbin.com/pemadama/1

This should work without throwing the exception, right?

@rodyhaddad
Copy link
Contributor

Check this comment for a workaround.

Here's your jsbin with the workaround: http://jsbin.com/pemadama/2/edit

hmm, I find it odd that ng-show plays a role in this

@Wizek
Copy link
Author

Wizek commented Apr 25, 2014

Thanks @rodyhaddad, that was helpful.

I too have no idea why ng-show makes any difference.

Do you think it makes sense to attach a failing unit-test-case to this issue as a pull request?

@petebacondarwin
Copy link
Contributor

So the reason that ng-show makes a difference is that it adds a directive between the top level "compile" node and the ng-if. You can see that any directive that gets in the way will cause this problem...

See http://jsbin.com/pemadama/6/edit

I think this is actually some kind of bug, since clearly the outer transclude is sort of available it is just not passed through when the compiler hits a directive that also creates a transclude. I feel that somehow we ought to have a stack of transclusion functions that directives can un-peel as we go down through the compilation....

@petebacondarwin petebacondarwin self-assigned this Apr 28, 2014
@petebacondarwin petebacondarwin added this to the 1.3.0-beta.8 milestone Apr 28, 2014
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue May 7, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function.

See angular#7240
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue May 7, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function, only if the first transclude directive is not
the first directive found in compilation.

See angular#7240
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue May 7, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function, only if the first transclude directive is not
the first directive found in compilation.

See angular#7240
@caitp caitp modified the milestones: 1.3.0-beta.9, 1.3.0-beta.8 May 9, 2014
@IgorMinar IgorMinar modified the milestones: 1.3.0, 1.3.0-beta.9 May 12, 2014
@petebacondarwin petebacondarwin modified the milestones: 1.3.0-beta.9, 1.3.0 May 12, 2014
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue May 14, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function.

See angular#7240
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue May 14, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function, only if the first transclude directive is not
the first directive found in compilation.

See angular#7240
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue May 14, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function, only if the first transclude directive is not
the first directive found in compilation.

See angular#7240
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue May 15, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function, only if the first transclude directive is not
the first directive found in compilation.

See angular#7240
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue May 15, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function, only if the first transclude directive is not
the first directive found in compilation.

See angular#7240
@petebacondarwin
Copy link
Contributor

This is fixed by #7387 : see http://jsbin.com/pemadama/9/edit

petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this issue May 16, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Fixes angular#7240
Closes angular#7387
vojtajina added a commit that referenced this issue May 16, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Fixes #7240
Closes #7387
IgorMinar pushed a commit to IgorMinar/angular.js that referenced this issue May 16, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Fixes angular#7240
Closes angular#7387
IgorMinar pushed a commit to IgorMinar/angular.js that referenced this issue May 16, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Fixes angular#7240
Closes angular#7387
vojtajina added a commit that referenced this issue May 16, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Fixes #7240
Closes #7387
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this issue May 21, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Fixes angular#7240
Closes angular#7387
@rodyhaddad
Copy link
Contributor

This should be re-opened as 4f03dc5 was reverted by e994259.
Here's the original jsbin with the latest snapshot: http://jsbin.com/pemadama/12/edit

petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue May 22, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Handles the regression identified in e994259

Fixes angular#7240
Closes angular#7387
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue May 22, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Handles the regression identified in e994259

Fixes angular#7240
Closes angular#7387
petebacondarwin added a commit that referenced this issue May 23, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Handles the regression identified in e994259

Fixes #7240
Closes #7387
RichardLitt pushed a commit to RichardLitt/angular.js that referenced this issue May 24, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Fixes angular#7240
Closes angular#7387
vojtajina pushed a commit to vojtajina/angular.js that referenced this issue May 28, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Handles the regression identified in e994259

Fixes angular#7240
Closes angular#7387
vojtajina pushed a commit to vojtajina/angular.js that referenced this issue May 28, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Handles the regression identified in e994259

Fixes angular#7240
Closes angular#7387
vojtajina pushed a commit to vojtajina/angular.js that referenced this issue May 29, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Handles the regression identified in e994259

Fixes angular#7240
Closes angular#7387
vojtajina pushed a commit to vojtajina/angular.js that referenced this issue May 29, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Handles the regression identified in e994259

Fixes angular#7240
Closes angular#7387
caitp pushed a commit to caitp/angular.js that referenced this issue Jun 13, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Handles the regression identified in e994259

Fixes angular#7240
Closes angular#7387
petebacondarwin added a commit that referenced this issue Jun 13, 2014
If you have two directives that both expect to receive transcluded content
the outer directive works but the inner directive never receives a
transclusion function. This only failed if the first transclude directive
was not the first directive found in compilation.

Handles the regression identified in e994259

Fixes #7240
Closes #7387
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.