{"id":28321442,"url":"https://github.com/dagonmetric/ng-config","last_synced_at":"2026-03-09T03:34:41.653Z","repository":{"id":39097961,"uuid":"179058108","full_name":"DagonMetric/ng-config","owner":"DagonMetric","description":"Configuration \u0026 options service for Angular.","archived":false,"fork":false,"pushed_at":"2025-06-24T09:15:13.000Z","size":3581,"stargazers_count":11,"open_issues_count":24,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-28T11:11:26.355Z","etag":null,"topics":["angular","angular-config","angular-config-loader","angular-config-provider","angular-config-service","angular-configuration-service","angular-http-config-provider","angular-options-service","angular-settings-service","ng-config","typescript"],"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/DagonMetric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-02T10:55:10.000Z","updated_at":"2021-06-05T02:37:01.000Z","dependencies_parsed_at":"2022-08-18T19:32:54.395Z","dependency_job_id":"f9d9eccd-52ee-4de0-bf77-ec78d640748d","html_url":"https://github.com/DagonMetric/ng-config","commit_stats":{"total_commits":877,"total_committers":3,"mean_commits":292.3333333333333,"dds":"0.49600912200684155","last_synced_commit":"371e005a4b57a7c41126e450a632302411f67756"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/DagonMetric/ng-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DagonMetric%2Fng-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DagonMetric%2Fng-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DagonMetric%2Fng-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DagonMetric%2Fng-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DagonMetric","download_url":"https://codeload.github.com/DagonMetric/ng-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DagonMetric%2Fng-config/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265889121,"owners_count":23844539,"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","angular-config","angular-config-loader","angular-config-provider","angular-config-service","angular-configuration-service","angular-http-config-provider","angular-options-service","angular-settings-service","ng-config","typescript"],"created_at":"2025-05-25T12:14:00.351Z","updated_at":"2026-03-09T03:34:36.615Z","avatar_url":"https://github.com/DagonMetric.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Configuration \u0026 Options Service for Angular\n\n[![GitHub Actions Status](https://github.com/DagonMetric/ng-config/workflows/Main%20Workflow/badge.svg)](https://github.com/DagonMetric/ng-config/actions)\n[![Azure Pipelines Status](https://dev.azure.com/DagonMetric/ng-config/_apis/build/status/DagonMetric.ng-config?branchName=master)](https://dev.azure.com/DagonMetric/ng-config/_build?definitionId=9)\n[![codecov](https://codecov.io/gh/DagonMetric/ng-config/branch/master/graph/badge.svg)](https://codecov.io/gh/DagonMetric/ng-config)\n[![Gitter](https://badges.gitter.im/DagonMetric/general.svg)](https://gitter.im/DagonMetric/general?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\nThe `ng-config` is a configuration and options service for Angular applications with flexible api and extendable config providers.\n\n## Features\n\n* **`mapType(key, MyOptionsClass)`** - map configuration values with options class\n* **`mapObject(key, myOptionsObj)`** - map configuration values with options object\n* **`getValue('myKey')`** - get the raw configuration section value\n* **`reload()`** - reload the fresh configuration values from config providers\n* **`valueChanges`** - configuration value changes event\n* **`ConfigProvider`** - extendable config provider interface and multiple config providers are supported\n* **`ConfigModule.configure(true, {...})`** - load configuration automatically at app starts\n* Latest version of Angular and compatible with server side rendering (SSR / Angular Universal)\n\n## Get Started\n\n### Installation\n\nnpm\n\n```bash\nnpm install @dagonmetric/ng-config\n```\n\nor yarn\n\n```bash\nyarn add @dagonmetric/ng-config\n```\n\nLatest npm package is [![npm version](https://badge.fury.io/js/%40dagonmetric%2Fng-config.svg)](https://www.npmjs.com/package/@dagonmetric/ng-config)\n\n### Module Setup (app.module.ts)\n\n```typescript\nimport { ConfigModule } from '@dagonmetric/ng-config';\nimport { HttpConfigProviderModule } from '@dagonmetric/ng-config/http-config';\n\n@NgModule({\n  imports: [\n    // Other module imports\n\n    // ng-config modules\n    ConfigModule.configure(true, {\n      debug: true\n    }),\n    HttpConfigProviderModule.configure({\n        endpoint: '/api/v1/configuration'\n    }),\n    // And additional config provider imports...\n  ]\n})\nexport class AppModule { }\n```\n\nLive edit [app.module.ts in stackblitz](https://stackblitz.com/github/dagonmetric/ng-config/tree/master/samples/demo-app?file=src%2Fapp%2Fapp.module.ts)\n\n### Usage\n\n```typescript\nimport { Component } from '@angular/core';\n\nimport { ConfigService } from '@dagonmetric/ng-config';\n\nexport class AppOptions {\n  name = '';\n  lang = '';\n  logEnabled = false;\n  logLevel = 0;\n}\n\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html'\n})\nexport class AppComponent {\n  constructor(private readonly configService: ConfigService) {\n    // Get with key\n    const configValue = this.configService.getValue('key1'));\n    console.log('value: ', configValue);\n\n    // Get with options class\n    const appOptions = this.configService.mapType('app', AppOptions));\n    console.log('appOptions: ', JSON.stringify(appOptions));\n\n    // Call reload to get the fresh config values from providers\n    // this.configService.reload().subscribe(() =\u003e {\n    //   console.log('Reloaded');\n    // });\n\n    // Configuration value change detection\n    // This will only trigger when reload() is called and\n    // any value changes\n    this.configService.valueChanges.subscribe(() =\u003e {\n      const latestValue = this.configService.getValue('key1'));\n      console.log('latest value: ', latestValue);\n\n      const lastestOptions = this.configService.mapType('app', AppOptions));\n      console.log('lastest appOptions: ', lastestOptions);\n    });\n  }\n}\n```\n\nLive edit [app.component.ts in stackblitz](https://stackblitz.com/github/dagonmetric/ng-config/tree/master/samples/demo-app?file=src%2Fapp%2Fapp.component.ts)\n\n## Samples \u0026 Documentations\n\n* Demo app [view source](https://github.com/DagonMetric/ng-config/tree/master/samples/demo-app) / [live edit in stackblitz](https://stackblitz.com/github/dagonmetric/ng-config/tree/master/samples/demo-app)\n* Documentation wiki [ng-config wiki](https://github.com/DagonMetric/ng-config/wiki)\n\n## Integrations\n\n* [ng-config-firebase-remote-config](https://github.com/DagonMetric/ng-config-firebase-remote-config) - Implements [ConfigProvider](https://github.com/DagonMetric/ng-config/blob/master/modules/ng-config/src/config-provider.ts) for Firebase Remote Config\n\n## Related Projects\n\n* [ng-log](https://github.com/DagonMetric/ng-log) - Vendor-agnostic logging, analytics and telemetry service abstractions and some implementations for Angular applications\n* [ng-cache](https://github.com/DagonMetric/ng-cache) - Caching service for Angular applications\n\n## Build \u0026 Test Tools\n\nWe use [lib-tools](https://github.com/lib-tools/lib-tools) for bundling, testing and packaging our library projects.\n\n[![Lib Tools](https://repository-images.githubusercontent.com/273890506/28038a00-dcea-11ea-8b4a-7d655158ccf2)](https://github.com/lib-tools/lib-tools)\n\n## Feedback and Contributing\n\nCheck out the [Contributing](https://github.com/DagonMetric/ng-config/blob/master/CONTRIBUTING.md) page.\n\n## License\n\nThis repository is licensed with the [MIT](https://github.com/DagonMetric/ng-config/blob/master/LICENSE) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagonmetric%2Fng-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdagonmetric%2Fng-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagonmetric%2Fng-config/lists"}