Hi all, this is similar to an older bug (issue 4935:
https://goo.gl/f1A9RW) but am seeing it on 1.3.13 (also 1.5.5). Basically, I have a parent directive that uses transclusion. The transcluded content is an element with a child directive that is ng-repeated. Here's a Plunk that shows the same problem using ng-if instead of ng-repeat:
http://plnkr.co/edit/HZO9goSDcKHIrWWPyr6S?p=preview
If you look in your debug console, you'll see this:
angular.js:13550 Error: [$compile:ctreq] Controller 'main', required by directive 'sub', can't be found!
Stepping through the code, it looks like the clone goes through its link phase prior to actually being added to the DOM. While I can understand why this is the case, it also means that the parent directive requirements cannot be met as there is no parent hierarchy to search.
Is this by design, or can assumptions be made based on the futureParentElement for transclusion (using default parent element at least for this requirement search)?