title: Calling a function when ng-repeat has finished
body: <p>What I am trying to implement is basically a "on ng repeat finished rendering" handler. I am able to detect when it is done but I can't figure out how to trigger a function from it.</p>
  
  <p>Check the fiddle:<a href="http://jsfiddle.net/paulocoelho/BsMqq/3/">http://jsfiddle.net/paulocoelho/BsMqq/3/</a></p>
  
  <p>JS</p>
  
  <pre><code>var module = angular.module('testApp', [])
      .directive('onFinishRender', function () {
      return {
          restrict: 'A',
          link: function (scope, element, attr) {
              if (scope.$last === true) {
                  element.ready(function () {
                      console.log("calling:"+attr.onFinishRender);
                      // CALL TEST HERE!
                  });
              }
          }
      }
  });
  
  function myC($scope) {
      $scope.ta = [1, 2, 3, 4, 5, 6];
      function test() {
          console.log("test executed");
      }
  }
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;div ng-app="testApp" ng-controller="myC"&gt;
      &lt;p ng-repeat="t in ta" on-finish-render="test()"&gt;{{t}}&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Answer</strong>:
  Working fiddle from finishingmove: <a href="http://jsfiddle.net/paulocoelho/BsMqq/4/">http://jsfiddle.net/paulocoelho/BsMqq/4/</a> </p>