This app is an example how to use child components in Angular reactive forms.
You can also checkout the code online in CodeSandbox:
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
Felix Haus Website • Twitter |
---|