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

ng:include inside ng:repeat doesn't render #3627

Closed
dphung20 opened this issue Aug 16, 2013 · 11 comments
Closed

ng:include inside ng:repeat doesn't render #3627

dphung20 opened this issue Aug 16, 2013 · 11 comments

Comments

@dphung20
Copy link

ng:include nested inside a ng:repeat doesn't seem to be rendering anymore. This use to be working in version 1.1.5 but not on the latest build

working version: http://jsfiddle.net/KAFCK/3/
non-working version: http://jsfiddle.net/KAFCK/46/

reference discussion: https://groups.google.com/forum/#!topic/angular/JjmnPQl-SWg

@jonyschak
Copy link

ng:include also does not render when used in the same element with an ng-if like:
<div ng-if="true" ng-include src="'/foo.html'"></div>

or with nested divs like

<div ng-if="true">
    <div ng-include src="'/foo.html'"></div>
</div>

Both worked in 1.1.5

working version: http://jsfiddle.net/jonyschak/9NygZ/2/
non-working version: http://jsfiddle.net/jonyschak/9NygZ/

@bchoii
Copy link

bchoii commented Aug 18, 2013

Recursive ng-includes work in 1.1.5

working version : http://jsfiddle.net/bchoii/qPnxN/2/

Recursive ng-includes do not work in 1.2.0rc1

non-working version : http://jsfiddle.net/bchoii/qPnxN/3/

@dkingsbury
Copy link

ng-include in ng-switch no longer works in 1.2.0rc1:
http://jsfiddle.net/YSzxN/

Working in 1.1.5
http://jsfiddle.net/YSzxN/1/

@kevin-smets
Copy link

Dupe of #3584. Transclusion is seriously broken in 1.2 rc1.

@chiefy
Copy link

chiefy commented Aug 22, 2013

👍

@nrw
Copy link

nrw commented Aug 25, 2013

I'm running into this issue, too.

@kevin-smets
Copy link

You can try running the latest snapshot, that solved a lot (maybe all?) transclusion problems:

http://code.angularjs.org/snapshot/

@nrw
Copy link

nrw commented Aug 25, 2013

Thanks for the tip! The latest snapshot solved my problem.

@jbdeboer
Copy link
Contributor

As mentioned here and in #3584, this issue is solved in the latest snapshot.

Comment on #3584 if you are still seeing bugs with the latest snapshot.

@valentinvieriu
Copy link

@jbdeboer It seems to work with the latest snapshot here is an example: http://jsfiddle.net/valentinvieriu/YSzxN/9/
but if we put the ng-switch and ng-include on the same div it starts to act very strange. Here is an example: http://jsfiddle.net/valentinvieriu/YSzxN/10/

@matsko
Copy link
Contributor

matsko commented Aug 30, 2013

@valentinvieriu ngInclude always needs it's own element even if it's on the same element as ngSwitch. With 1.2rc1 ngInclude "transcludes" itself (so it clones itself) each time the expression changes. NgSwitch also creates and recreates the same elements, but since ngInclude does that too then they compete against each other. The solution right now is to create a new HTML tag with the ngInclude info inside of each switch tag.

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

No branches or pull requests

10 participants