title: Passing data from custom directive into parent controller
body: <p>I have created custom angular directive. For an example:</p>
  
  <p><strong>Custom directive:</strong></p>
  
  <pre><code>var app=angular.module('app',[]);
  app.directive('customDirective',function(){
  return{
     restrict:A,
     controller:customDirectiveController,
     scope:{
           someArray:"="
           }
     }
  })
  </code></pre>
  
  <p><strong>Custom directive controller:</strong></p>
  
  <pre><code>app.controller('customDirectiveController',function(scope){
      scope.someArray=[];
      scope.someArray.push(1);
      scope.someArray.push(2);
      scope.someArray.push(3);
  });
  </code></pre>
  
  <p><strong>Parent controller:</strong></p>
  
  <pre><code>app.controller('parentCtrl',function($scope){
      $scope.result=[];
  });
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div data-ng-controller="parentCtrl"&gt;
    &lt;div data-custom-directive="result"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How can I get value of this someArray from custom directive into Parent controller( result variable should in Parent controller be same as someArray from custom directive controller)?</p>
  
  <p>Here is jsfiddle <a href="http://jsfiddle.net/mehmedju/RmDuw/302/" rel="nofollow">http://jsfiddle.net/mehmedju/RmDuw/302/</a>
  Thanks</p>