{"id":20434015,"url":"https://github.com/zewa666/aurelia-async-binding","last_synced_at":"2025-10-27T23:40:34.631Z","repository":{"id":37686689,"uuid":"110022007","full_name":"zewa666/aurelia-async-binding","owner":"zewa666","description":"Aurelia async bindingbehavior to consume Observables and Promises","archived":false,"fork":false,"pushed_at":"2023-01-09T06:23:23.000Z","size":454,"stargazers_count":18,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-19T02:45:14.118Z","etag":null,"topics":["aurelia","aurelia-binding","aurelia-store","rxjs"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/zewa666.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":"2017-11-08T19:38:59.000Z","updated_at":"2025-02-27T07:38:55.000Z","dependencies_parsed_at":"2023-02-08T09:01:42.133Z","dependency_job_id":null,"html_url":"https://github.com/zewa666/aurelia-async-binding","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zewa666/aurelia-async-binding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewa666%2Faurelia-async-binding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewa666%2Faurelia-async-binding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewa666%2Faurelia-async-binding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewa666%2Faurelia-async-binding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zewa666","download_url":"https://codeload.github.com/zewa666/aurelia-async-binding/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewa666%2Faurelia-async-binding/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281361405,"owners_count":26487881,"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","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aurelia","aurelia-binding","aurelia-store","rxjs"],"created_at":"2024-11-15T08:23:22.530Z","updated_at":"2025-10-27T23:40:34.617Z","avatar_url":"https://github.com/zewa666.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aurelia-async-binding\r\n\r\n[![npm Version](https://img.shields.io/npm/v/aurelia-async-binding.svg)](https://www.npmjs.com/package/aurelia-async-binding)\r\n[![Join the chat at https://gitter.im/aurelia/discuss](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aurelia/discuss?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\r\n[![CircleCI](https://circleci.com/gh/zewa666/aurelia-async-binding.svg?style=shield)](https://circleci.com/gh/zewa666/aurelia-async-binding)\r\n[![Coverage Status](https://coveralls.io/repos/github/zewa666/aurelia-async-binding/badge.svg?branch=master)](https://coveralls.io/github/zewa666/aurelia-async-binding?branch=master)\r\n\r\nAn Aurelia binding behavior to consume async streams and promises directly from within your templates.\r\n\r\n## Install\r\nInstall the npm dependency via\r\n\r\n```bash\r\nnpm install aurelia-async-binding\r\n```\r\n\r\n## Configuration\r\nIn your `main.ts` you'll have to register the plugin which makes it globally available:\r\n\r\n```typescript\r\nimport {Aurelia} from 'aurelia-framework'\r\nimport environment from './environment';\r\n\r\nexport function configure(aurelia: Aurelia) {\r\n  aurelia.use\r\n    .standardConfiguration()\r\n    .feature('resources');\r\n\r\n  ...\r\n\r\n  aurelia.use.plugin(\"aurelia-async-binding\");  // \u003c----- REGISTER THE PLUGIN\r\n\r\n  aurelia.start().then(() =\u003e aurelia.setRoot());\r\n}\r\n```\r\n\r\n## Features\r\n* Easily access streamed values\r\n* Pluck complex object properties\r\n* Deep-plucking to access nested complex object properties using the dot-notation\r\n* Register `completedHandler` for once the stream completes\r\n* Register `error` handlers to react on streamed errors\r\n\r\n\r\n## Usage\r\nOnce the plugin is installed and configured you can use the `async` binding behavior.\r\nAn example VM and View can be seen below:\r\n\r\n```typescript\r\nimport { Observable } from 'rxjs/Observable';\r\nimport \"rxjs/add/operator/map\";\r\nimport \"rxjs/add/operator/take\";\r\nimport \"rxjs/add/observable/interval\";\r\nimport \"rxjs/add/observable/of\";\r\nimport \"rxjs/add/observable/from\";\r\n\r\ninterface SPAFramework {\r\n  label: string;\r\n  url: string;\r\n}\r\nexport class App {\r\n  public frameworks: Observable\u003cSPAFramework[]\u003e;\r\n  public frameworkOverTime: Observable\u003cSPAFramework\u003e;\r\n  public isSequenceDone: boolean = false;\r\n\r\n  constructor() {\r\n    const data: SPAFramework[] = [\r\n      { label: \"Aurelia\", url: \"http://aurelia.io\" },\r\n      { label: \"Angular v4\", url: \"http://angular.io\" },\r\n      { label: \"React\", url: \"https://facebook.github.io/react/\" },\r\n    ];\r\n\r\n    this.frameworks = Observable.of(data);\r\n\r\n    this.frameworkOverTime = Observable.interval(2000)\r\n      .map((idx) =\u003e data[idx])\r\n      .take(data.length);\r\n  }\r\n\r\n  public completedHandler = () =\u003e {\r\n    setTimeout(() =\u003e this.isSequenceDone = true, 2000);\r\n  }\r\n}\r\n```\r\n\r\n```html\r\n\u003ctemplate\u003e\r\n  \u003ch1\u003eSPA Frameworks\u003c/h1\u003e\r\n  \u003cul\u003e\r\n    \u003cli repeat.for=\"framework of frameworks \u0026 async\"\u003e\r\n      \u003ca href=\"${framework.url}\"\u003e${framework.label}\u003c/a\u003e\r\n    \u003c/li\u003e\r\n  \u003c/ul\u003e\r\n\r\n  \u003ch1\u003eFrameworks streamed (plucked property)\u003c/h1\u003e\r\n  \u003cdiv\u003e\r\n      ${frameworkOverTime \u0026 async: { property: 'label' }}\r\n  \u003c/div\u003e\r\n\r\n  \u003ch1\u003eFrameworks streamed (with binding, completed handler)\u003c/h1\u003e\r\n  \u003cdiv with.bind=\"frameworkOverTime \u0026 async: { completed: completedHandler }\"\u003e\r\n    \u003ca if.bind=\"!isSequenceDone\" href=\"${url}\"\u003e${label}\u003c/a\u003e\r\n    \u003cspan if.bind=\"isSequenceDone\"\u003eSequence is done!\u003c/span\u003e\r\n  \u003c/div\u003e\r\n\u003c/template\u003e\r\n\r\n```\r\n\r\n## Acknowledgement\r\nThanks goes to Dwayne Charrington for his Aurelia-TypeScript starter package https://github.com/Vheissu/aurelia-typescript-plugin\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzewa666%2Faurelia-async-binding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzewa666%2Faurelia-async-binding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzewa666%2Faurelia-async-binding/lists"}