angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

ng-include directives are not expanded when transcluded

Open cdmckay opened this issue 13 years ago • 13 comments

When I upgraded to 1.2.0rc1 my ng-include directives are no longer expanded when transcluded into a ng-transclude.

Here's the Plunk: http://plnkr.co/edit/NHlNI8bdpGX7ibBoDzcx?p=preview

cdmckay avatar Aug 14 '13 05:08 cdmckay

+1

hccampos avatar Aug 14 '13 09:08 hccampos

I'd guess this could be the root cause for #3581 and #3584...

I've been unable to get ng-include to work with ng-switch. Same behavior it seems...

Carl012 avatar Aug 15 '13 00:08 Carl012

Same... also unable to get ng-include working with ng-switch

matb33 avatar Aug 15 '13 02:08 matb33

For people who need an ngInclude workaround badly (like me) here's the working 1.0.7 version that you can plop into your 1.2.0rc1 app (it doesn't support animation): https://gist.github.com/cdmckay/6238612

cdmckay avatar Aug 15 '13 06:08 cdmckay

There is a similar issue (if not the same) with ng-view inside a transcluded directive.

XtraKrispi avatar Aug 15 '13 18:08 XtraKrispi

@matsko Please add test case for this use case when you revert the ng-include/ng-view manual transclusion.

mhevery avatar Aug 15 '13 21:08 mhevery

This works with the latest snapshot!

http://plnkr.co/edit/TlDolruADXdT4sUPEaiE?p=preview

@cdmckay thx for the fix, that also worked :)

kevin-smets avatar Aug 29 '13 07:08 kevin-smets

This works in 1.1.5 if you want animations for the time being (what I'm doing).

jordanburke avatar Sep 04 '13 20:09 jordanburke

What about 1.2rc2? Can anyone check that out?

matsko avatar Sep 04 '13 21:09 matsko

works with rc.2, closing.

IgorMinar avatar Sep 04 '13 23:09 IgorMinar

I'm on rc.2 and it's not working. When switching between multiple elements, an element with ng-include will not be switched and seems to be duplicated in the dom.

kirkhoff avatar Oct 14 '13 19:10 kirkhoff

I think this relates: I'm on 1.2.4 and using ng-if within a template that I'm linking/transcluding in a directive and its not working. I assuming that the ng-if is not being triggered at the right time?? But I've tried pre/post linking in the compile function with no luck...

So yea, doesn't seem to work in 1.2.4.

homerjam avatar Dec 13 '13 16:12 homerjam

can you please open a new issue and create a plunker that reproduces the problem? thanks!

IgorMinar avatar Dec 13 '13 17:12 IgorMinar