The html looks like:
<div ng-controller="MainCtrl">
<outer>
<inner ng-repeat="d in data">
<div>{{d}}</div>
</inner>
</outer>
</div>
The repeat works, and the inner-directive is applied as expected.
The outer-directive looks like:
directives.directive('outer', function () {
return {
compile: function (elm) {
// ... do some jQuery
}
}
});
Without the repeat, the outer-directive is applied as expected. But with the repeat, the outer-directive is applied before the repeat writes the appropriate nodes to the DOM.
I've seen suggestions to use timeout within the directive, which seems a bit of a hack to me. Additionally it looks like there is a finished-repeat hook that I could use to then alter scope and reapply the directive.