ng:include inside ng:repeat doesn't render
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
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/
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/
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/
Dupe of #3584. Transclusion is seriously broken in 1.2 rc1.
:+1:
I'm running into this issue, too.
You can try running the latest snapshot, that solved a lot (maybe all?) transclusion problems:
http://code.angularjs.org/snapshot/
Thanks for the tip! The latest snapshot solved my problem.
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.
@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/
@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.