{"id":27957968,"url":"https://github.com/ngneat/subscribe","last_synced_at":"2025-05-07T18:15:38.023Z","repository":{"id":44700376,"uuid":"330223846","full_name":"ngneat/subscribe","owner":"ngneat","description":"Subscription Handling Directive","archived":false,"fork":false,"pushed_at":"2022-11-30T07:37:23.000Z","size":1561,"stargazers_count":35,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-29T21:23:54.378Z","etag":null,"topics":["angular","subscribe","subscription","template"],"latest_commit_sha":null,"homepage":"https://netbasal.com/diy-subscription-handling-directive-in-angular-c8f6e762697f","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/ngneat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-16T18:00:16.000Z","updated_at":"2024-04-12T03:36:44.000Z","dependencies_parsed_at":"2023-01-22T13:00:39.773Z","dependency_job_id":null,"html_url":"https://github.com/ngneat/subscribe","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngneat%2Fsubscribe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngneat%2Fsubscribe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngneat%2Fsubscribe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngneat%2Fsubscribe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngneat","download_url":"https://codeload.github.com/ngneat/subscribe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252299157,"owners_count":21725712,"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","subscribe","subscription","template"],"created_at":"2025-05-07T18:15:37.359Z","updated_at":"2025-05-07T18:15:38.004Z","avatar_url":"https://github.com/ngneat.png","language":"TypeScript","readme":"[![MIT](https://img.shields.io/packagist/l/doctrine/orm.svg?style=flat-square)]()\n[![commitizen](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)]()\n[![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)]()\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-1)\n[![ngneat](https://img.shields.io/badge/@-ngneat-383636?style=flat-square\u0026labelColor=8f68d4)](https://github.com/ngneat/)\n[![spectator](https://img.shields.io/badge/tested%20with-spectator-2196F3.svg?style=flat-square)]()\n\n\n\u003e  Subscription Handling Directive\n\n## Installation\n\n`npm install @ngneat/subscribe`\n\n## Usage\nNow we can import the `SubscribeDirective` and use the `subscribe` directive in our template:\n\n```ts\nimport { SubscribeDirective } from '@ngneat/subscribe';\n\n@Component({\n  imports: [SubscribeDirective],\n  template: `\n    \u003cng-container *subscribe=\"users$ as users; let error=error\"\u003e\n      {{ users | json }}\n      {{ error }}\n    \u003c/ng-container\u003e\n  `\n})\nclass MyComponent {\n  users$ = inject(UserService).getUsers();\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngneat%2Fsubscribe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngneat%2Fsubscribe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngneat%2Fsubscribe/lists"}