{"id":13805499,"url":"https://github.com/hsbalar/ngx-recursive-form","last_synced_at":"2025-04-07T00:33:42.610Z","repository":{"id":56686418,"uuid":"148315534","full_name":"hsbalar/ngx-recursive-form","owner":"hsbalar","description":"Angular recursive form at any level based on your json input.","archived":false,"fork":false,"pushed_at":"2020-10-25T09:57:13.000Z","size":2641,"stargazers_count":37,"open_issues_count":2,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-04T01:05:01.710Z","etag":null,"topics":["angular6","hacktoberfest","ng-zorro-antd","reactive-forms","recursive-forms"],"latest_commit_sha":null,"homepage":"https://www.hiteshbalar.com/ngx-recursive-form/","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/hsbalar.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":"2018-09-11T12:43:01.000Z","updated_at":"2024-07-19T06:55:41.000Z","dependencies_parsed_at":"2022-08-15T23:20:22.291Z","dependency_job_id":null,"html_url":"https://github.com/hsbalar/ngx-recursive-form","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsbalar%2Fngx-recursive-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsbalar%2Fngx-recursive-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsbalar%2Fngx-recursive-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsbalar%2Fngx-recursive-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hsbalar","download_url":"https://codeload.github.com/hsbalar/ngx-recursive-form/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223268204,"owners_count":17116777,"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":["angular6","hacktoberfest","ng-zorro-antd","reactive-forms","recursive-forms"],"created_at":"2024-08-04T01:01:01.751Z","updated_at":"2024-11-06T01:23:53.176Z","avatar_url":"https://github.com/hsbalar.png","language":"TypeScript","funding_links":[],"categories":["Components"],"sub_categories":["Themes"],"readme":"# Ngx Recursive Form\nAngular recursive form at any level based on your json input. [`Demo`](http://www.hiteshbalar.com/ngx-recursive-form/formx)\n\n\u003ca\u003e\u003cimg src=\"https://github.com/hsbalar/ngx-recursive-form/blob/master/src/assets/logo.png\" height=\"150\" title=\"image\" alt=\"image\"\u003e\u003c/a\u003e\n\n### Install\n\n\u003e Note: Ngx recursive form supports only [ng-zorro-antd](https://ng.ant.design/docs/introduce/en) for now. So, you need to install it beforehand.\n\n```bash\n$ npm install ng-zorro-antd\n$ npm install ngx-recursive-form --save\n```\n\n### Import the NgxRecursiveFormModule:\n```js\nimport { NgxRecursiveFormModule } from 'ngx-recursive-form';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n  declarations: [AppComponent],\n  imports: [NgxRecursiveFormModule, ReactiveFormsModule],\n  bootstrap: [AppComponent]\n})\nexport class AppModule {}\n```\n\n### Initialize form in your component.ts file:\n```js\nimport { NgxRecursiveFormService } from 'ngx-recursive-form';\nimport { FormGroup } from '@angular/forms';\n\npublic form: FormGroup;\npublic formJson: any;\nconstructor(public ngxFormService: NgxRecursiveFormService) {}\n\nngOnInit() {\n  this.ngxFormService.initNgxRecursiveForm(this.formJson) // JSON schema as first parameter, Default JSON value as second parameter (optional)\n    .subscribe(res =\u003e {\n      this.form = res.form;\n      this.formJson = res.orderedFormJson;\n    }, err =\u003e {\n      console.log(err);\n    });\n}\n```\n\n### Create \u003cngx-recursive-form\u003e tag in your component.html file:\n```html\n\u003cform nz-form [formGroup]=\"form\" (ngSubmit)=\"submit()\" *ngIf=\"form\"\u003e\n  \u003cngx-recursive-form [form]=\"form\" [formJson]=\"formJson\"\u003e\u003c/ngx-recursive-form\u003e\n  \u003cbutton nz-button type=\"submit\"\u003eSubmit\u003c/button\u003e\n\u003c/form\u003e\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhsbalar%2Fngx-recursive-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhsbalar%2Fngx-recursive-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhsbalar%2Fngx-recursive-form/lists"}