Question: I have a ng-repeat directive which displays a list of links. It works fine, but my code also has a javascript function which places the list depending on its dimensions. Naturally, the dimension of the list is not known until Angular is done databinding and modifying the DOM. If I call the function immediately after data change, then the placement calculation jumps the gun and places the list as if it's empty. I want to fire the function once Angular is done modifying the DOM. How can I do that?

**EDIT:**

Just tried ngcloak as a possible solution, unfortunately it does not work. Reading ngcloak's documentation, my problem is not that the list flickers, but it is placed as if it's empty, and then stays there. I need a way to call my function once the databinding is complete.

Answer: 
I've done this before by creating a custom directive to use in addition to ng-repeat. So for example

```
<div ng-repeat="foo in bar" myDirective>

```

What that gives you is that in `myDirective` you can access the directive's scope and check for the last item in the ng-repeat render. For example this is what I have for using the isotope jquery library on some elements rendered by ng-repeat:

```
angular
    .module('myModule')
    .directive('myDirective', function ($timeout) {
        return {
            restrict: 'A',
            link: function postLink(scope, element, attrs) {
                if (attrs.ngRepeat && scope.$last) {
                    $timeout(function() {
                        $('#myContainer').isotope({
                           layoutMode: 'fitRows'
                        });
                    });
                }
            }
        };
    });

```

This used with html like:

```
<div id="myContainer" ng-repeat="foo in bar" myDirective>
    <div class="element">{{foo}}</div>
</div>

```

Should give you what you're looking for.

Just replace `$('#myContainer').isotope({})` with what you want to execute when ng-repeat has finished rendering your repeat.
I think [ngCloak](http://docs.angularjs.org/api/ng.directive%3angCloak) is what you are looking for.