title: How to use variable from a Controller in a Directive link function?
body: <p>I want to be able to use the variable "videoUrlId" from the controller 'useSpreadsheetData' below in my directive 'meetings'. How can I do this? I have looked at require but could not get it to work.</p>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>app.controller('useSpreadsheetData', ['$scope', '$sce', 'getSpreadsheetData',      
  function($scope, $sce, getSpreadsheetData){
  for(var x in videos) {
        if(videos[x].switchValue) {
          var videoUrlId = videos[x].videoUrl;
          $scope.videoUrlId = videoUrlId;
          break;
        }
      }
  };
  </code></pre>
  
  <p><strong>Directive:</strong></p>
  
  <pre><code>app.directive('meetings', [ 'getCalendar', '$timeout', '$window',  
  function(getCalendar, $timeout, $window){
  return {
      restrict: 'E',
      templateUrl: 'scripts/directives/meetings.html',
      controller: 'useSpreadsheetData',
      link: function(scope){
      //Use videoUrlId variable here
      }
  }
  }]);
  </code></pre>