{"id":20792636,"url":"https://github.com/denieler/angular-sequence-events","last_synced_at":"2025-12-25T06:45:41.742Z","repository":{"id":35977928,"uuid":"40269263","full_name":"denieler/angular-sequence-events","owner":"denieler","description":"Sequential code and chained execution of events, handlers, etc. ","archived":false,"fork":false,"pushed_at":"2017-10-15T18:39:56.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T00:07:34.292Z","etag":null,"topics":["angular","events","functional-programming","library"],"latest_commit_sha":null,"homepage":"","language":null,"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/denieler.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":"2015-08-05T21:16:54.000Z","updated_at":"2017-11-06T21:58:08.000Z","dependencies_parsed_at":"2022-08-30T20:00:44.071Z","dependency_job_id":null,"html_url":"https://github.com/denieler/angular-sequence-events","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denieler%2Fangular-sequence-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denieler%2Fangular-sequence-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denieler%2Fangular-sequence-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denieler%2Fangular-sequence-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denieler","download_url":"https://codeload.github.com/denieler/angular-sequence-events/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243071097,"owners_count":20231572,"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","events","functional-programming","library"],"created_at":"2024-11-17T15:53:06.715Z","updated_at":"2025-12-25T06:45:41.699Z","avatar_url":"https://github.com/denieler.png","language":null,"readme":"# Angular Sequence Events\nLibrary allows you to make sequential execution of events, handlers, broadcasts, etc. in next way:\n\n````js\n    var sequence = new Sequence(this.$scope);\n\n    sequence\n    .wait('userAction-1')\n    .wait('userScroll-1', self.scrollManager)\n    .broadcast('userFinished-Scroll-1-Action')\n    .wait('userAction-2')\n    .wait('userScroll-2', self.scrollManager)\n    .exec(myFunction)\n    .broadcast('userFinished-Scroll-2-Action')\n    .wait('userAction-3')\n    .run({\n      loopLastAction: true\n    });\n````\n\nLibrary now works for AngularJS, using its `$scope` events mechanism. \n\nLib is in ES2015 syntax, so if you need it in ES5, please use babel to transpile.\n\n# Action types\n\nLibrary have now 3 types of functions:\n    \n`wait (eventName)` - to wait when event has been executed\n\n`exec (funciton)` - executes some code\n\n`broadcast (eventName)` - broadcasts the event\n    \n# Mechanism\n\nWhen you create the sequence you are starting some journey. In which you could use 3 types of functions: wait, exec, broadcast. \n\nexample:\n\n````js\n    var sequence = new Sequence(this.$scope);\n\n    sequence\n    .wait('userAction-1')\n    .wait('userScroll-1', self.scrollManager)\n    .run();\n````\n\nHere you are waiting for the event `userAction-1` from any angular component, then when event has been fired you are going to the next step - waiting for the event `userScroll-1`. When you pass second parameter in `wait` function it means that you are calling method `userScroll-1` in `self.scrollManager` object and this method is getting callback as parameter. And when callback will be fired from this object next sequence method will be executed.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenieler%2Fangular-sequence-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenieler%2Fangular-sequence-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenieler%2Fangular-sequence-events/lists"}