Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Thanks for the tip on eval. I won't use that aftwr all, but the console.log line which is before it sgould execute, even if the $eval doesn't work, right? I don't see why mine doesn't. The problem is I have tons of code so I can't really fiddle it. If i make a fiddle, it will probably work because it's so simple. I wonder in general what might cause a link function to be ignored. Commented May 18, 2014 at 13:26
  • maybe you can start checking ng-if? normally you don't use ng-if and ng-show in the same directive, because ng-if removes the element from the DOM and ng-show just hides it. Commented May 18, 2014 at 13:35
  • hey @trusktr I edited my answer to give you some more hints. check the value of your analysis.type variable. maybe you can force it to be true and see what happens, or remove the ng-if attribute? Commented May 18, 2014 at 13:48
  • Thanks for the insight! You helped me find the problem: If the value of analysis.type used in the ngInclude directive doesn't cause a matching template to be found, then the link function of my ngElementReady directive doesn't execute. As soon as I set the value of analysis.type (at some time in the future) to some value that causes a template to be found, then I see the link function output. This is actually good, as it lets me run stuff when the "element ready". Commented May 19, 2014 at 2:30