title: How to access parent directive's controller by requiring it recursively?
body: <p>I'm trying to reach the controller of a parent "box" directive recursively:</p>
  
  <pre><code>&lt;body ng-app="main"&gt;
  
  &lt;!-- no nesting: parent is the just body --&gt;
  &lt;box&gt;&lt;/box&gt;
  
  &lt;script type="text/javascript"&gt;
  angular.module('main', [])
  .directive('box', function() {
      return {
          restrict: 'E',
          controller: function() { },
          require: '?^box',  // find optional PARENT "box" directive
          link: function(scope, iElement, iAttrs, controller) {
              // controller should be undefined, as there is no parent box
              alert('Controller found: ' + (controller !== undefined));
          }
      };
  });
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I'd expect controller variable to be <code>undefined</code> in the link function, but I get the controller of the actual box directive.</p>
  
  <p>So my question is ... how to gain access to the PARENT controller in case like this:</p>
  
  <pre><code>&lt;box&gt;
      &lt;box&gt;&lt;/box&gt;
  &lt;/box&gt;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/gjv9g/1/">http://jsfiddle.net/gjv9g/1/</a></p>