I have one auto-carousel directive which iterates through the linked element\'s children.
The children however are not yet loaded in th
If you need to watch for any changes deeper in the element's dom, MutationObserver is the way to go :
.directive('myDirective', function() {
return {
...
link: function(scope, element, attrs) {
var observer = new MutationObserver(function(mutations) {
// your code here ...
});
observer.observe(element[0], {
childList: true,
subtree: true
});
}
};
});