{"id":18051912,"url":"https://github.com/shhdharmen/reusable-material-form","last_synced_at":"2026-05-09T10:06:43.865Z","repository":{"id":177805172,"uuid":"623892902","full_name":"shhdharmen/reusable-material-form","owner":"shhdharmen","description":"It is possible to create custom form field controls that can be used inside \u003cmat-form-field\u003e. This can be useful if you need to create a component that shares a lot of common behavior with a form field, but adds some additional logic.  For example in this guide I have created an address form and hook it up to work with \u003cmat-form-field\u003e.","archived":false,"fork":false,"pushed_at":"2023-07-04T10:53:24.000Z","size":189,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T14:53:30.719Z","etag":null,"topics":["angular","angular-forms","angular-material","angular-material-forms","css","html","mat-cards","mat-form-field","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/shhdharmen.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}},"created_at":"2023-04-05T10:07:24.000Z","updated_at":"2024-02-06T18:36:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"5cd59078-592a-4ce1-a506-15dd90e3ca61","html_url":"https://github.com/shhdharmen/reusable-material-form","commit_stats":null,"previous_names":["shhdharmen/reusable-material-form"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shhdharmen%2Freusable-material-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shhdharmen%2Freusable-material-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shhdharmen%2Freusable-material-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shhdharmen%2Freusable-material-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shhdharmen","download_url":"https://codeload.github.com/shhdharmen/reusable-material-form/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299850,"owners_count":20916193,"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-forms","angular-material","angular-material-forms","css","html","mat-cards","mat-form-field","typescript"],"created_at":"2024-10-30T22:57:44.319Z","updated_at":"2026-05-09T10:06:38.795Z","avatar_url":"https://github.com/shhdharmen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Creating a custom form field control group using Angular Material\n\nIt is possible to create custom form field controls that can be used inside `\u003cmat-form-field\u003e`. This can be useful if you need to create a component that shares a lot of common behavior with a form field, but adds some additional logic.\n\nFor example in this guide I have created an address form and hook it up to work with `\u003cmat-form-field\u003e`.\n\n```html\n\u003cdiv [formGroup]=\"form\" class=\"form-container\"\u003e\n  \u003cmat-card class=\"shipping-card\"\u003e\n    \u003cmat-card-header\u003e\n      \u003cmat-card-title\u003eShipping Information\u003c/mat-card-title\u003e\n    \u003c/mat-card-header\u003e\n    \u003cmat-card-content\u003e\n      \u003cmat-form-field  appearance=\"outline\" class=\"full-width address-form\"\u003e\n        \u003c!-- 💡 Look at below line --\u003e\n        \u003capp-address-form formControlName=\"address\" required\u003e\u003c/app-address-form\u003e\n      \u003c/mat-form-field\u003e\n    \u003c/mat-card-content\u003e\n  \u003c/mat-card\u003e\n\n  \u003cbutton mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"form.invalid\"\u003eSubmit\u003c/button\u003e\n\u003c/div\u003e\n\n```\n\nThe code for `\u003capp-address-form\u003e` is present at [src\\app\\shared\\address-form](https://github.com/shhdharmen/reusable-material-form/tree/main/src/app/shared/address-form).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshhdharmen%2Freusable-material-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshhdharmen%2Freusable-material-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshhdharmen%2Freusable-material-form/lists"}