Hi
In my directive I use something like this:
var newScope = $scope.$new();
var newElement = $compile(...)(newScope);
later in an JQuery mousemove event I do something like:
if(!$rootScope.$$phase) {
scope.$apply(function () {
newScope.$destroy();
});
}
Unfortunately that causes and exception:
TypeError: Cannot read property '$$nextSibling' of null
in:
// Insanity Warning: scope depth-first traversal
// yes, this code is a bit crazy, but it works and we have tests to prove it!
// this piece should be kept in sync with the traversal in $broadcast
if (!(next = (current.$$childHead || (current !== target && current.$$nextSibling)))) {
while(current !== target && !(next = current.$$nextSibling)) {
current = current.$parent;
}
Is there a bug?
Best regards
Bernd