I have this directive
MyApp.directive('dynatree', function ($rootScope) {
return {
restrict: 'E',
link: function postlink(scope, element, attrs) {
$(element).dynatree({
onActivate: function (node) {
scope.$emit('nodeActivated', node);
},
persist: false,
children: scope.treeData //this variable is in the layout for either csb or sku
});
}
};
});
My controller contains the values for children:
scope.treeData = [ ... ]
Every time I update scope.treeData, my directive does not update. Does anyone have any idea on how to update my directive from my controller?
Thank you