Help me to understand.
There is a controller. Data comes to it, all is well.
function interviewCtrl($scope, InterviewFactory){ $scope.interview = []; InterviewFactory.getInterview().success(function(data){ $scope.interview = data; }); } I create a directive:
app.directive('ngDatelimit', function () { return { restrict: 'E', link: function(scope){ console.log(scope); } }; }); In the console I see the contents of the osprey, including the interview object. But I can not access the scope.interview , returns an empty object.
How to get the contents of the already filled $scope.interview ?
$watch- or make a service call directly inside the directive. - Grundy