title: Accessing parent directive's controller recursively in AngularJS
body: <p>I need to get parent's controller, so my directive has a require property, as follows:</p>
  
  <pre class="lang-js prettyprint-override"><code>module.directive('tag', function () {
      return {
          require: '?^tag',
          restrict: 'E',
          controller: function () {
              this.payload = getPayload();
          },
          link: function (scope, element, attrs, ctrl) {
              usePayload(ctrl.payload);
          }
      };
  });
  </code></pre>
  
  <p>However the ctrl parameter of the link function returns the controller of the current directive, not the parent's one. AngularJS documentation is clear about this:</p>
  
  <blockquote>
    <p>?^ - Attempt to locate the required controller by searching the element's parents, or return null if not found.</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>