0

EDIT: It was a short-lived bug with ng-include inside ng-repeat. I never updated my angular dependency. Solution Found here : https://groups.google.com/forum/#!topic/angular/JjmnPQl-SWg

This is a very difficult problem, because I can't even replicate the issue on plunker because it works on plunker:

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

I'm creating a dashboard for my web application. Essentially, I have a number of nested directives each with a templateUrl. Within the 4th layer of directives, I have:

<div data-ng-include="widget.tpl"></div>

Everything seems to be in place perfectly. On Chrome, the network tab indicates the HTML file is returning with the correct result, inspecting the DOM shows the appropriate

<!-- ngInclude: widget.tpl -->

directly before where the template should be loaded. It's not a matter of some sort of race condition because the tpl url is hard-coded, not dynamically calculated in my link function. The AngularJS properties on the elements show the appropriate properties in their scopes for that directive.

Yet the ng-included template is not appended to the DOM.

Any help or guidance with this would be glorious. As you can see in the above plunker, it works perfectly.

m.deady
  • 96
  • 3

1 Answers1

0

I'd have just commented, but I don't have enough rep. I think I'd consider starting to work upstream to your parent directives to see if anything above could be causing a problem. Take away one level of complexity at a time until you find something that changes the behavior. Does the Plunker code work if you use it locally? Without seeing the broken code I think it will be hard for anyone to help. Sorry if my answer isn't what you're looking for.

Craig Squire
  • 2,141
  • 14
  • 13