{"id":20538260,"url":"https://github.com/celtian/ngx-update-app","last_synced_at":"2025-10-24T09:51:06.296Z","repository":{"id":214550967,"uuid":"736329048","full_name":"Celtian/ngx-update-app","owner":"Celtian","description":"Angular directive for updating app via service workers","archived":false,"fork":false,"pushed_at":"2025-02-13T10:14:08.000Z","size":1429,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T07:59:11.059Z","etag":null,"topics":["angular","library"],"latest_commit_sha":null,"homepage":"","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/Celtian.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-27T15:57:58.000Z","updated_at":"2025-02-13T10:12:50.000Z","dependencies_parsed_at":"2024-06-01T17:26:32.422Z","dependency_job_id":"d40c98f9-8143-40ce-b710-06ed6e5148bd","html_url":"https://github.com/Celtian/ngx-update-app","commit_stats":null,"previous_names":["celtian/ngx-update-app"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Celtian%2Fngx-update-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Celtian%2Fngx-update-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Celtian%2Fngx-update-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Celtian%2Fngx-update-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Celtian","download_url":"https://codeload.github.com/Celtian/ngx-update-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844047,"owners_count":21170486,"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","library"],"created_at":"2024-11-16T00:46:06.139Z","updated_at":"2025-10-24T09:51:06.271Z","avatar_url":"https://github.com/Celtian.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Celtian/ngx-update-app\" target=\"blank\"\u003e\u003cimg src=\"assets/logo.svg?sanitize=true\" alt=\"\" width=\"120\"\u003e\u003c/a\u003e\n  \u003ch1 align=\"center\"\u003eNgxUpdateVersion\u003c/h1\u003e\n\u003c/p\u003e\n\n[![npm version](https://badge.fury.io/js/ngx-update-app.svg)](https://badge.fury.io/js/ngx-update-app)\n[![Package License](https://img.shields.io/npm/l/ngx-update-app.svg)](https://www.npmjs.com/ngx-update-app)\n[![NPM Downloads](https://img.shields.io/npm/dm/ngx-update-app.svg)](https://www.npmjs.com/ngx-update-app)\n[![Snyk](https://snyk.io//advisor/npm-package/ngx-update-app/badge.svg)](https://snyk.io//advisor/npm-package/ngx-update-app)\n[![stars](https://badgen.net/github/stars/celtian/ngx-update-app)](https://github.com/celtian/ngx-update-app/)\n[![forks](https://badgen.net/github/forks/celtian/ngx-update-app)](https://github.com/celtian/ngx-update-app/)\n[![HitCount](http://hits.dwyl.com/celtian/ngx-update-app.svg)](http://hits.dwyl.com/celtian/ngx-update-app)\n\n\u003e Angular directive for updating app via service workers\n\n\u003e ✓ _Angular 20 compatible_\n\nHere's the [demo](http://celtian.github.io/ngx-update-app/)\n\n- Lightweight\n- No dependencies!\n- Directive way\n- Customizable [options](#options)...\n\n## 🛠️ Install\n\n```terminal\nyarn add ngx-update-app\n```\n\n## 🚀 Quick start\n\n1. Provide config\n\n```typescript\nimport { provideUpdateApp } from 'ngx-update-app';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideUpdateApp({\n      interval: 1000 * 60, // check new version every minute\n      dryRun: false, // set to true if you want to see alert on init\n      onUpdateFactory: () =\u003e {\n        // you can use inject() here\n        return () =\u003e alert('Should update');\n      }\n    }),\n    provideServiceWorker('ngsw-worker.js', { enabled: !isDevMode(), registrationStrategy: 'registerWhenStable:30000' })\n  ]\n};\n```\n\n2. Use directive in root component\n\n```typescript\nimport { NgxUpdateAppDirective } from 'ngx-update-app';\n\n@Component({ standalone: true, hostDirectives: [NgxUpdateAppDirective] })\nexport class AppComponent {}\n```\n\n## 🛠️ Options\n\n| Option              | Type     | Default   | Description                                   |\n| ------------------- | -------- | --------- | --------------------------------------------- |\n| **interval**        | number   | undefined | interval to check new version in milliseconds |\n| **dryRun**          | boolean  | false     | force update action once on init              |\n| **onUpdateFactory** | function | undefined | function which will be called on update       |\n\n## 🔧 Compatibility\n\n| Angular | ngx-update-app | Install                     |\n| ------- | -------------- | --------------------------- |\n| \u003e= 20   | 2.x            | `yarn add ngx-update-app`   |\n| \u003e= 18   | 1.x            | `yarn add ngx-update-app@1` |\n| \u003e= 17   | 0.x            | `yarn add ngx-update-app@0` |\n\n## 📦 Dependencies\n\n_None_\n\n## 🪪 License\n\nCopyright \u0026copy; 2023 - 2025 [Dominik Hladik](https://github.com/Celtian)\n\nAll contents are licensed under the [MIT license].\n\n[mit license]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceltian%2Fngx-update-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceltian%2Fngx-update-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceltian%2Fngx-update-app/lists"}