Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ofhouse/angular-forms-child-components
Example Angular app which demonstrates how to use child components in an reactive form context.
https://github.com/ofhouse/angular-forms-child-components
angular angular-learning
Last synced: 17 days ago
JSON representation
Example Angular app which demonstrates how to use child components in an reactive form context.
- Host: GitHub
- URL: https://github.com/ofhouse/angular-forms-child-components
- Owner: ofhouse
- Created: 2019-09-30T16:25:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-30T16:55:08.000Z (over 5 years ago)
- Last Synced: 2024-12-10T14:29:28.170Z (30 days ago)
- Topics: angular, angular-learning
- Language: TypeScript
- Homepage: https://codesandbox.io/s/github/ofhouse/angular-forms-child-components
- Size: 124 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example Angular app
This app is an example how to use child components in Angular reactive forms.
> You can also checkout the code online in CodeSandbox:
[View it on CodeSandbox](https://codesandbox.io/s/github/ofhouse/angular-forms-child-components)
## Idea
The idea is to to create a `formGroup` in the main view and pass it to it's child components.
The child components then create a new form by themselves and initialize it with the passed `formGroup` input value from the main view.To learn more about this technique you can checkout this article by Josh Hicks:
[Using Child Components in Angular Forms](https://medium.com/@joshblf/using-child-components-in-angular-forms-d44e60036664)
## Author
| [
Felix Haus](https://github.com/ofhouse)
[Website](https://felix.house/) • [Twitter](https://twitter.com/ofhouse)|
| :---: |