{"id":14973528,"url":"https://github.com/cvuorinen/angular1-async-filter","last_synced_at":"2025-10-27T01:30:43.866Z","repository":{"id":57179483,"uuid":"51948269","full_name":"cvuorinen/angular1-async-filter","owner":"cvuorinen","description":"Angular2 async pipe implemented as Angular 1 filter to handle promises \u0026 RxJS observables","archived":false,"fork":false,"pushed_at":"2017-03-15T19:52:34.000Z","size":11,"stargazers_count":59,"open_issues_count":2,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-01T01:25:23.328Z","etag":null,"topics":["angularjs","filter","observable","promise","rxjs"],"latest_commit_sha":null,"homepage":null,"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/cvuorinen.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":"2016-02-17T19:17:08.000Z","updated_at":"2024-06-17T18:59:01.000Z","dependencies_parsed_at":"2022-09-11T16:24:33.936Z","dependency_job_id":null,"html_url":"https://github.com/cvuorinen/angular1-async-filter","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvuorinen%2Fangular1-async-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvuorinen%2Fangular1-async-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvuorinen%2Fangular1-async-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvuorinen%2Fangular1-async-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cvuorinen","download_url":"https://codeload.github.com/cvuorinen/angular1-async-filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238418230,"owners_count":19468869,"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":["angularjs","filter","observable","promise","rxjs"],"created_at":"2024-09-24T13:48:54.695Z","updated_at":"2025-10-27T01:30:38.415Z","avatar_url":"https://github.com/cvuorinen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular1 async filter\n\n\u003e Angular2 async pipe implemented as Angular 1 filter to handle Promises \u0026 RxJS Observables\n\nThe async filter takes a Promise or Observable as input and subscribes to the input automatically, eventually returning the emitted value(s) similarly as with Angular2 Async pipe.\nWorks with RxJS Observables even without https://github.com/Reactive-Extensions/rx.angular.js\n\n## Install\n\nInstall from npm:\n\n```\nnpm install angular1-async-filter --save\n```\n\nAnd bundle with Browserify, Webpack etc.\n\n\nOr install with bower:\n\n```\nbower install angular1-async-filter --save\n```\n\nAnd add script to html:\n\n```html\n\u003cscript src=\"bower_components/angular1-async-filter/async-filter.js\"\u003e\u003c/script\u003e\n```\n\nAdd Angular module dependency. For example:\n\n```js\nangular.module('myApp', ['asyncFilter']);\n```\n\n## Usage\n\nBasic usage:\n\n```html\n\u003cdiv\u003eValue: {{ promiseOrObservable | async }}\u003c/div\u003e\n```\n\nWorks with any directive that takes an expression, like `ng-if`, `ng-show` and `ng-repeat` etc.\n\n```html\n\u003cul\u003e\n    \u003cli ng-repeat=\"item in list|async\"\u003e{{ item }}\u003c/li\u003e\n\u003c/ul\u003e\n```\n\nAngular $q and $http promises automatically trigger digest cycle when they resolve so all views will get updated.\nFor compatibility with RxJS Observables, as well as other Promise or Observable implementations, you can provide the current scope as a parameter to the filter, which will then automatically trigger digest cycle whenever a new value is emitted:\n\n```html\n\u003cdiv ng-if=\"{{ observable | async:this }}\"\u003e\n    Value: {{ observable | async:this }}\n\u003c/div\u003e\n```\n\nIf you are using the `safeApply` operator from https://github.com/Reactive-Extensions/rx.angular.js for example, then `this` is not needed.\n\nLive example: http://jsbin.com/qoxaqo/edit?html,js,output\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvuorinen%2Fangular1-async-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcvuorinen%2Fangular1-async-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvuorinen%2Fangular1-async-filter/lists"}