Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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)|
| :---: |