Since this code is async:
dataArchive.get().then(function(data){
$scope.getData = data;
});
The link
function will run before the data is set on getData
, and therefore the isolated scope variable will not be set at this time. So, I believe you are seeing a timing issue.
To make sure that your directive binding is correct. Try to set $scope.getData
to a static value (e.g. $scope.getData = [{ data: 'value'}]
). This should work.
Also, Angular checks for changes (to rebind) based on object reference. So, you might need to define $scope.getData
in the controller (outside of the async call). Then you might want to push
all the data in (instead of replace the entire object with the assignment).
Hope this helps.