Problem using collectionRepeat together with swipeCards

I’m trying to mix the two directives but I get the following error:

 Error: [$compile:ctreq] Controller 'swipeCards', required by directive 'swipeCard', can't be found!

http://errors.angularjs.org/1.3.13/$compile/ctreq?p0=swipeCards&p1=swipeCard

I think I need to have the collectionRepeat directive complete the link phase before the swipeCard directive can compile because the element is not yet in the DOM tree for require: ^swipeCards.

Here is a codepen: http://codepen.io/anon/pen/KwxaeR

it turns out that for my app, I didn’t actually need to access a controller in ^swipeCards so I just removed the requirement.

However, the angular pattern still exists:

  • how do you use a directive inside CollectionRepeat (or any other directive that compiles/links(?)) that requires a parent directive outside CollectionRepeat?

Hi,
I think I have the same problem: collectionRepeat and custom directives
Switching from collection-repeat to ng-repeat all goes fine.
I think it has something to do with how DOM is rendered by collectionRepeat, nested directives don’t find any parent during the link phase.