{"id":17458152,"url":"https://github.com/pocesar/angular-onfinish","last_synced_at":"2025-10-06T13:36:45.453Z","repository":{"id":11670649,"uuid":"14179950","full_name":"pocesar/angular-onfinish","owner":"pocesar","description":"Directives that execute a function or an expression when ng-repeat is done with looping. No need for events.","archived":false,"fork":false,"pushed_at":"2013-11-07T13:59:05.000Z","size":112,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-18T06:28:40.630Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pocesar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-06T17:26:50.000Z","updated_at":"2015-05-19T20:23:41.000Z","dependencies_parsed_at":"2022-07-14T02:50:33.371Z","dependency_job_id":null,"html_url":"https://github.com/pocesar/angular-onfinish","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Fangular-onfinish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Fangular-onfinish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Fangular-onfinish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Fangular-onfinish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pocesar","download_url":"https://codeload.github.com/pocesar/angular-onfinish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246895502,"owners_count":20851281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-18T03:55:34.477Z","updated_at":"2025-10-06T13:36:40.397Z","avatar_url":"https://github.com/pocesar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"angular-onfinish\n================\n\nDirectives that execute a function or an expression when ng-repeat is done with looping. No need for events.\n\n## Usage\n\n#### Include it in your app:\n\n```js\nvar yourapp = angular.module('yourapp', ['onfinish']);\n```\n\n#### In your HTML, set the `on-finish` attribute:\n\n```html\n\u003cli ng-repeat=\"item in list\" on-finish=\"finished()\"\u003e\u003c/li\u003e\n\u003cli ng-repeat=\"item in items\" on-finish=\"done=true\"\u003e\u003c/li\u003e\n```\n\n#### Make sure your scope has the variables / functions:\n\n```js\nApp.controller('MyCtrl', function(){\n  $scope.finished = function(){\n    console.log('done looping');\n  };\n  \n  $scope.list = ['yaba', 'daba', 'doo'];\n  \n  $scope.items = [\n    {id: 1},\n    {id: 2},\n    {id: 3}\n  ];\n  \n  $scope.done = false;\n});\n```\n\n#### Have fun\n\n## Notes\n\n* Expressions are evaluated inside the `on-finish=\"\"`, so you cannot use `$scope`  variables there\n* There are no modifications on the original `$scope`, it's the exact same `$scope` that you have inside your `ng-repeat` directive (same IDs, variables, etc)\n* The code is evaluated BEFORE the browser render the DOM elements. Be aware of it. If you must, place in your `finished` function a `$timeout` with the 3rd parameter as `false`, so it won't trigger another `$digest` cycle  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpocesar%2Fangular-onfinish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpocesar%2Fangular-onfinish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpocesar%2Fangular-onfinish/lists"}