Skip to content

Instantly share code, notes, and snippets.

@reqshark
Forked from vol4ok/gist:9364446
Created May 3, 2014 07:02
Show Gist options
  • Save reqshark/9d4f5b1e48fd7dabde44 to your computer and use it in GitHub Desktop.
Save reqshark/9d4f5b1e48fd7dabde44 to your computer and use it in GitHub Desktop.
angular.module("app").directive("onRepeatFinish", ["$timeout", function($timeout){
return {
restrict: "A",
link: function($scope, $element, $attrs) {
if ($scope.$last) {
$timeout(function(){
if (angular.isFunction($scope[$attrs["onRepeatFinish"]]))
$scope[$attrs["onRepeatFinish"]]()
});
}
}
}
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment