Skip to content

Instantly share code, notes, and snippets.

@tcarlsen
Created January 19, 2015 14:26
Show Gist options
  • Save tcarlsen/ccc2df585811a8ba2b86 to your computer and use it in GitHub Desktop.
Save tcarlsen/ccc2df585811a8ba2b86 to your computer and use it in GitHub Desktop.
fire function after ngRepeat is done in Angularjs
angular.module "onFinishRenderDirective", []
.directive "onFinishRender", ($timeout) ->
restrict: "A"
link: (scope, element, attr) ->
if scope.$last
$timeout -> scope.$emit "ngRepeatFinished"
@tcarlsen
Copy link
Author

use then like this:

$scope.$on "ngRepeatFinished", ->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment