You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
I'm getting an error in what looks to be the compile step where the node is undefined when calling childLinkFn inside compositeLinkFn. This was causing some expression and directives to not be evaluated in the document. Changing } else if (childLinkFn) { to } else if (childLinkFn && node) { works but I want to know more about the issue. The base module, "app", is bound to body and it contains a good ammount of SVG elements though I did not find that they were apart of the issue. Also, the page is rather small in that it has less than 5000 DOM elements in it. Is this related to another bug, or is there some other issue I can look for to fix the issue besides the patch I made?
line:6040 of angular.js (1.2.19)
} else if (childLinkFn) {
childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);
}
Error Dump
TypeError: Cannot read property 'childNodes' of undefined
at compositeLinkFn (.../angular.js:6042:36)
at compositeLinkFn (.../angular.js:6042:13)
at compositeLinkFn (.../angular.js:6042:13)
at compositeLinkFn (.../angular.js:6042:13)
at compositeLinkFn (.../angular.js:6042:13)
at compositeLinkFn (.../angular.js:6042:13)
at compositeLinkFn (.../angular.js:6042:13)
at publicLinkFn (.../angular.js:5934:30)
at .../angular.js:1420:27
at Scope.$eval (.../angular.js:12595:28)
The text was updated successfully, but these errors were encountered:
I could create a bin / plunker / fiddle that produces the the same error text. Would it be produced by the same cause, I would not be cretin. Can you suggest a way for me to debug to find out more information?
If you know in what function / line the error is thrown, you can add a break point in it, and try to extract some data from it, such as the directive name, element etc. Then try to remove some elements, directives etc. or try some elements in isolation, and see if the error persists.
I had a similar issue. I'll just put my solution here for anyone that has the same issue.
The cause: Modifying the dom while it's being compiled.
I was adding a lot of html to the dom and then using $compile to compile it.
Inside the html the was a directive that would then change it's dom structure using jQuery.
The solution: Use $timeout.
To avoid the "Cannot read property 'childNodes' of undefined" you just have the wrap the jQuery code that modifies the DOM inside a $timeout function with delay set to 0. I'm thinking this avoids the code to run while angular is still compiling the code.
I'm getting an error in what looks to be the compile step where the
node
is undefined when callingchildLinkFn
insidecompositeLinkFn
. This was causing some expression and directives to not be evaluated in the document. Changing} else if (childLinkFn) {
to} else if (childLinkFn && node) {
works but I want to know more about the issue. The base module, "app", is bound tobody
and it contains a good ammount of SVG elements though I did not find that they were apart of the issue. Also, the page is rather small in that it has less than 5000 DOM elements in it. Is this related to another bug, or is there some other issue I can look for to fix the issue besides the patch I made?line:6040 of angular.js (1.2.19)
Error Dump
The text was updated successfully, but these errors were encountered: