title: AngularJS passing json to directive
body: <p>I'm still new in Angular but i'm doing some progress.. i think :)
  I have problem passing json file from controller to directive using isolated scope.</p>
  
  <p>This is my controller which talk to factory "dataArchive":</p>
  
  <pre><code>.controller('graphCtrl', ['$scope', 'dataArchive', function($scope, dataArchive){
      dataArchive.get().then(function(data){
          $scope.getData = data;
      });
  }]);
  </code></pre>
  
  <p>Then i have directive which is using isolated scope.</p>
  
  <pre><code>.directive('dataGraph', function($compile){
      return {
          restrict: 'AE',
          replace: true,
          scope: {
              getArchiveData: '='
          },
          template: '&lt;div id="chartdiv"&gt;&lt;/div&gt;',
          link: function (scope, element, attrs){
               var dati = scope.getArchiveData;
               console.log(dati);
          };
       };
   });
  </code></pre>
  
  <p>And this is my HTML:</p>
  
  <pre><code>&lt;div ng-controller="graphCtrl"&gt;
      &lt;data-graph get-archive-data="getData"&gt;&lt;/data-graph&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In console i always get 'undefined'.</p>
  
  <p>Where i am wrong and is this a good way?</p>
  
  <p>Thanks you all.</p>