title: AngularJs running code after ng-repeat binding happens
body: <p>I have a data table that I am loading with a call to a $resource.  It is doing a query and using the returned value in an ng-repeat within the view.  This all works great.  The problem is that I am trying to use the DataTables jquery plugin and need that to be run after the table is loaded with all the rows, meaning after angular has run the ng-repeat with the updated values that came back from the $resource call.</p>
  
  <p>Here is what my controller code looks like at the moment:</p>
  
  <pre><code>  $scope.model = {
        roles: []
    };
  
    $scope.model.roles = $resource('/api/admin/user/role').query();
  
    $scope.$watch('model.roles', function () {
        console.log('watch called');
        handleDataTables();
    });
  
    var handleDataTables = function() {
        $('#rolelist').dataTable({
            "sPaginationType": "bs_full"
        });
    };
  </code></pre>
  
  <p>I thought that the watch would get called when the rows of the table were already created, but it doesn't appear to be working that way.  I also tried calling handleDataTables in the success callback of the $resource.query call but that doesn't work either.</p>
  
  <p>I can get it working by doing a timeout before calling handleDataTables, but that just feels dirty.</p>