title: Angular transcluded directive as sibling scope incompatible with child directive's require: "^parent" setting
body: <p>I'm having an issue with the way AngularJS handles transcluded scopes for directives. It is known that a transclude's scope is a sibling of its directive's scope, not a child. <a href="https://stackoverflow.com/q/17788289/1267778">Shown here</a></p>
  
  <p>However, I have a situation with a child directive:</p>
  
  <pre><code> &lt;div price-chart&gt;
        &lt;div volume-indicator&gt;&lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>The priceChart directive has a <code>transclude: true, template: "&lt;div ng-transclude&gt;&lt;/div&gt;"</code> but the (transcluded) volumeIndicator requires the parent to be a priceChart, not the sibling. </p>
  
  <pre><code>function VolumeIndicatorDirective() {
      return {
          restrict: "EA",
          controller: "VolumeIndicatorController",
          require: ["^priceChart", "volumeIndicator"],
          compile: function compile(element, attrs, transclude) {
              return {
                  pre: function preLink($scope, element, attrs, controllers) {
                      var priceChart = controllers[0];
                      var volumeIndicator = controllers[1];
                      priceChart.addIndicator(volumeIndicator);
                  },
                  post: angular.noop
              };
          }
      };
  }
  </code></pre>
  
  <p>If Angular had a sibling selector for controllers that would solve the issue:</p>
  
  <pre><code>require: ["+priceChart", "volumeIndicator"],
  </code></pre>
  
  <p>However, this doesn't exist so what can I do?</p>
  
  <p>As per comment from zeroflagL I tried <code>element.parent().controller()</code> to access the directive controller but it seems to get the nearest <code>ng-controller</code> specifically and skips over directive controllers.</p>