{"id":25651106,"url":"https://github.com/sgarg5858/dynamic-forms-poc","last_synced_at":"2026-05-02T23:41:22.773Z","repository":{"id":279064939,"uuid":"937347245","full_name":"sgarg5858/dynamic-forms-poc","owner":"sgarg5858","description":"Dynamic Forms in Angular, Configurable Global Error Management for Controls","archived":false,"fork":false,"pushed_at":"2025-02-27T22:22:34.000Z","size":582,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-19T01:49:11.950Z","etag":null,"topics":["angular","forms","rxjs","scss","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgarg5858.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-22T21:22:30.000Z","updated_at":"2025-02-27T22:16:41.000Z","dependencies_parsed_at":"2025-02-23T15:26:51.911Z","dependency_job_id":"1a42836d-c875-431f-81b4-6a587020348d","html_url":"https://github.com/sgarg5858/dynamic-forms-poc","commit_stats":null,"previous_names":["sgarg5858/dynamic-forms-poc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sgarg5858/dynamic-forms-poc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgarg5858%2Fdynamic-forms-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgarg5858%2Fdynamic-forms-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgarg5858%2Fdynamic-forms-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgarg5858%2Fdynamic-forms-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgarg5858","download_url":"https://codeload.github.com/sgarg5858/dynamic-forms-poc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgarg5858%2Fdynamic-forms-poc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32553689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T22:28:24.418Z","status":"ssl_error","status_checked_at":"2026-05-02T22:28:14.225Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["angular","forms","rxjs","scss","typescript"],"created_at":"2025-02-23T16:17:38.479Z","updated_at":"2026-05-02T23:41:22.751Z","avatar_url":"https://github.com/sgarg5858.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#\n # 1. Problems with [1-basic-dynamic-form-approach](https://github.com/sgarg5858/dynamic-forms-poc/tree/1-basic-dynamic-form-approach)\n\n1. We have the config and its type.\n2. But we have to create the formGroup and register control everytime, which we can move the logic to formService.\n3. But we have to do ngSwitchCase in the template, which we can move to one html file and we can use that file in every component template, but if take a look carefully, HTML part is exactly the design bottleneck where we create controls based on its type.\n4. In future we might have 20 type of controls, we can’t put all 20 switch blocks, we will be violating Single Responsibility Principle and Open/Closed Principle.\n5. My Idea is to extract each control into its own separate component and create those components dynamically using ngComponentOutlet.\n\n# 2. Bits about this: [2-dynamic-forms-without-nested-group-array-support](https://github.com/sgarg5858/dynamic-forms-poc/tree/2-dynamic-forms-without-nested-group-array-support)\n\n1. We have solved one problem by moving dynamic controls to their dedicated components, and resolving those compnonents via resolverService which helps in\n   introducing new controls with ease, also less repititive work.\n2. Till now our implementation supports only controls, we don't support formGroups or formArrays.\n3. I also don't like the explicity [formGroup]=\"form\" in every dynamic control component.\n4. But for now we will focus on introducing formGroup support to our dynamicForm Implementation.\n\n\n# 3. Bits about [3-dynamic-forms-with-form-group-support ](https://github.com/sgarg5858/dynamic-forms-poc/tree/3-dynamic-forms-with-form-group-support)\n\n1. FormGroup works fine now in our dynamic approach.\n2. But we have to use formGroup wrapper in every dynamic component, which i would like to remove and use more better approach.\n3. We will use viewProviders to resolve parent formGroup/formGroupName , as formControlName  resolves the provider for ControlContainer using @Host, so it should find a provider in the same view, providers will not work, as @Host decorator.\n\n# 4. Bits about [8-updating-error-messages-dynamically](https://github.com/sgarg5858/dynamic-forms-poc/tree/8-updating-error-messages-dynamically)\n\n1. Currently we ard hard-coding the logic of error messages in the directive, we can make that configurable.\n\n # 5. Bits about [9-configurable-error-state-matcher](https://github.com/sgarg5858/dynamic-forms-poc/tree/9-configurable-error-state-matcher)\n\n1. Implemented Configurable ErrorStateMatcher to configure the logic for rendering errors\n\n\n\n\n# DynamicFormsPoc\n\nThis project was generated using [Nx](https://nx.dev).\n\n\u003cp style=\"text-align: center;\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png\" width=\"450\"\u003e\u003c/p\u003e\n\n🔎 **Smart, Fast and Extensible Build System**\n\n## Quick Start \u0026 Documentation\n\n[Nx Documentation](https://nx.dev/angular)\n\n[10-minute video showing all Nx features](https://nx.dev/getting-started/intro)\n\n[Interactive Tutorial](https://nx.dev/tutorial/01-create-application)\n\n## Adding capabilities to your workspace\n\nNx supports many plugins which add capabilities for developing different types of applications and different tools.\n\nThese capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well.\n\nBelow are our core plugins:\n\n- [Angular](https://angular.io)\n  - `ng add @nrwl/angular`\n- [React](https://reactjs.org)\n  - `ng add @nrwl/react`\n- Web (no framework frontends)\n  - `ng add @nrwl/web`\n- [Nest](https://nestjs.com)\n  - `ng add @nrwl/nest`\n- [Express](https://expressjs.com)\n  - `ng add @nrwl/express`\n- [Node](https://nodejs.org)\n  - `ng add @nrwl/node`\n\nThere are also many [community plugins](https://nx.dev/community) you could add.\n\n## Generate an application\n\nRun `ng g @nrwl/angular:app my-app` to generate an application.\n\n\u003e You can use any of the plugins above to generate applications as well.\n\nWhen using Nx, you can create multiple applications and libraries in the same workspace.\n\n## Generate a library\n\nRun `ng g @nrwl/angular:lib my-lib` to generate a library.\n\n\u003e You can also use any of the plugins above to generate libraries as well.\n\nLibraries are shareable across libraries and applications. They can be imported from `@dynamic-forms-poc/mylib`.\n\n## Development server\n\nRun `ng serve my-app` for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng g component my-component --project=my-app` to generate a new component.\n\n## Build\n\nRun `ng build my-app` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.\n\n## Running unit tests\n\nRun `ng test my-app` to execute the unit tests via [Jest](https://jestjs.io).\n\nRun `nx affected:test` to execute the unit tests affected by a change.\n\n## Running end-to-end tests\n\nRun `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io).\n\nRun `nx affected:e2e` to execute the end-to-end tests affected by a change.\n\n## Understand your workspace\n\nRun `nx graph` to see a diagram of the dependencies of your projects.\n\n## Further help\n\nVisit the [Nx Documentation](https://nx.dev/angular) to learn more.\n\n\n\n\n\n\n## ☁ Nx Cloud\n\n### Distributed Computation Caching \u0026 Distributed Task Execution\n\n\u003cp style=\"text-align: center;\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/nrwl/nx/master/images/nx-cloud-card.png\"\u003e\u003c/p\u003e\n\nNx Cloud pairs with Nx in order to enable you to build and test code more rapidly, by up to 10 times. Even teams that are new to Nx can connect to Nx Cloud and start saving time instantly.\n\nTeams using Nx gain the advantage of building full-stack applications with their preferred framework alongside Nx’s advanced code generation and project dependency graph, plus a unified experience for both frontend and backend developers.\n\nVisit [Nx Cloud](https://nx.app/) to learn more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgarg5858%2Fdynamic-forms-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgarg5858%2Fdynamic-forms-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgarg5858%2Fdynamic-forms-poc/lists"}