title: unable to call a controller method from a sub directive
body: <p>I have the following directives. when i load the page I get an error stating that 'changeEditMode' is undefined. How can I call 'controllerInstance.changeEditMode()' from the 'editLink' directive?
  Is this the best way to do it?</p>
  
  <pre><code>var app = angular.module('jayDirectives', []);
  
  //  edit a cell directive
  var cellEdit = function () {
  return {
      restrict: 'A',
      scope: { cellValue: '@', editMode: '@', action: '&amp;' },
      link: function (scope, element, attrs) {
          if (scope.editMode === 'true')
              element.html('&lt;input id="' + attrs.id + '" type="text" value="' + scope.cellValue + '"/&gt;');
          else
              element.html(scope.cellValue);
      },
      controller: function ($scope) {
  
  
          this.changeEditMode= function () {
              console.log('test1');
          };
      }
  };
  };
  app.directive('cellEdit', cellEdit);
  
  
  var editLink = function () {
  
  return {
      restrict: 'A',
      require: "?cellEdit",
      link: function (scope, element, attrs, controllerInstance) {
          element.html('&lt;a&gt;Edit&lt;/a&gt;');
  
          element.bind("click", function () {
  
          controllerInstance.changeEditMode();
  
  
  
          });
      }        
  };
  };
  app.directive('editLink', editLink);
  
  
  &lt;div ng-app="jayDirectives"&gt;
  &lt;table&gt;
  &lt;tr&gt;
   &lt;td cell-Edit &gt;
   value1
   &lt;/td&gt;
  
  &lt;td edit-Link &gt;
   value2
  &lt;/td&gt;
  
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td cell-Edit &gt;
  value3
  &lt;/td&gt;
  
  &lt;td edit-Link &gt;
   value4
  &lt;/td&gt;
  
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>