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

ng-include doesn't work with ng-if in angular 1.2.0rc1 #3701

Closed
maku opened this issue Aug 22, 2013 · 5 comments
Closed

ng-include doesn't work with ng-if in angular 1.2.0rc1 #3701

maku opened this issue Aug 22, 2013 · 5 comments

Comments

@maku
Copy link

maku commented Aug 22, 2013

When I have a div which is conditionally shown (logical condition in ng-if) ng-include doesn't work anymore....

In the following example on clicking the button a detail view should be shown (which includes a ng-include)...
On first click ng-included content is NOT shown. Than on every click a new element is added...

http://plnkr.co/edit/RsJaSb
http://embed.plnkr.co/RsJaSb/preview

@kevin-smets
Copy link

Related to / dupe of #3584. Transclusion is seriously broken in 1.2 rc1.

@rtpm
Copy link

rtpm commented Aug 22, 2013

I've overcome the problem by moving ng-if/ng-show directive/logic inside the included template.

@NathanWalker
Copy link

@kevin-smets looks like latest master has this fixed. I believe @IgorMinar fixed a wide variety of similarly reported transclusion issues in a commit last week.

@kevin-smets
Copy link

@NathanWalker yup, I think I linked most of them, if not all to #3584. We're already using the latest snapshot for a few days which fixes the transclusion problems, thx for the tip.

Let's hope rc2 comes quick, so we can use bower again.

@btford
Copy link
Contributor

btford commented Dec 19, 2013

Seems to be working fine in 1.2.5: http://plnkr.co/edit/IKr5P1CPt2MuES2ZlxIT?p=preview

Let me know if that's not the case, and I'll re-open this. Thanks!

@btford btford closed this as completed Dec 19, 2013
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

5 participants