{"id":21068888,"url":"https://github.com/aaron-sterling/angular-animation-looper","last_synced_at":"2026-05-04T08:32:23.087Z","repository":{"id":57177991,"uuid":"119199804","full_name":"Aaron-Sterling/angular-animation-looper","owner":"Aaron-Sterling","description":"Dynamic looping of Angular animation. Specify an animation and a number of iterations, and the animation will repeat for that many iterations. You can change the number of iterations programmatically.","archived":false,"fork":false,"pushed_at":"2018-01-30T22:19:45.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-08T13:04:40.650Z","etag":null,"topics":["angular","angular-animation","angular-animations","animation","animations","ionic","loop","looper","looping"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aaron-Sterling.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-27T20:25:39.000Z","updated_at":"2018-03-26T11:00:18.000Z","dependencies_parsed_at":"2022-08-30T05:32:27.499Z","dependency_job_id":null,"html_url":"https://github.com/Aaron-Sterling/angular-animation-looper","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/Aaron-Sterling%2Fangular-animation-looper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaron-Sterling%2Fangular-animation-looper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaron-Sterling%2Fangular-animation-looper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaron-Sterling%2Fangular-animation-looper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aaron-Sterling","download_url":"https://codeload.github.com/Aaron-Sterling/angular-animation-looper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243510056,"owners_count":20302296,"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":["angular","angular-animation","angular-animations","animation","animations","ionic","loop","looper","looping"],"created_at":"2024-11-19T18:28:27.567Z","updated_at":"2026-05-04T08:32:23.010Z","avatar_url":"https://github.com/Aaron-Sterling.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# angular-animation-looper\nDynamic looping of Angular animations. Define an animaton with keyframes, specify a number of iterations, and the animation will repeat for that many iterations. You can change the number of iterations programmatically.\n\n* Next page: [Setup](https://github.com/Aaron-Sterling/angular-animation-looper/blob/master/docs/setup.md)\n* Complete example: [Ionic demo](https://github.com/Aaron-Sterling/angular-animation-looper/tree/master/ionic%20demo)\n\n## Installation\n```\nnpm install angular-animation-looper --save\n```\n\n## Sample usage\n\nIn your template:\n```\n\u003cdiv [@sampleTrigger]=\"animationState\" \n     (@sampleTrigger.done)=\"loop.next('sampleTrigger')\"\u003e\n\u003c/div\u003e\n```\n\nIn ```app.module.ts```:\n```\nimport { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { LoopAnimationModule } from 'angular-animations-looper';\n\n@NgModule({\n  declarations: [],\n  imports: [\n    BrowserModule,\n    BrowserAnimationsModule, // IMPORTANT: You must import these modules in this order\n    LoopAnimationModule\n  ],\n  bootstrap: [],\n  entryComponents: [],\n  providers: []\n})\nexport class AppModule {}\n```\n\nIn the ts file for your template:\n```\nimport { LoopAnimationService, loopableAnimation } from 'angular-animations-looper';\n\nimport ANIMATION_TO_LOOP from './animation-definition';  // this looks like : animate(starting state, keyframes)\nconst LOOPABLE_ANIMATION = loopableAnimaton(ANIMATION_TO_LOOP);\n\n@Component({\n\n  animations: [ LOOPABLE_ANIMATION ]; // declare the loopable animation in the component\n})\nexport class SampleClass {\n\n    constructor(public loop: LoopAnimationService) {  // \u003c-- inject this service\n\n    this.loop.registerAnimation('sampleTrigger', LOOPABLE_ANIMATION, 7);  // this animation will loop 7 times once it is started\n    this.loop.currentState('sampleTrigger').subscribe(state =\u003e this.animationState = state); // required so the service can talk to the trigger in the template\n    this.loop.startAnimation('sampleTrigger');  // starts the looping animation\n    }\n}\n```\n\n* Next page: [Setup](https://github.com/Aaron-Sterling/angular-animation-looper/blob/master/docs/setup.md)\n* Complete example: [Ionic demo](https://github.com/Aaron-Sterling/angular-animation-looper/tree/master/ionic%20demo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaron-sterling%2Fangular-animation-looper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaron-sterling%2Fangular-animation-looper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaron-sterling%2Fangular-animation-looper/lists"}