Angular Child Components with Reactive Forms

Angular Child Components with Reactive Forms

What are Reactive Forms?

Reactive forms provide a model-driven approach to handling form inputs whose values change over time. This guide shows you how to create and update a basic form control, progress to using multiple controls in a group, validate form values, and create dynamic forms where you can add or remove controls at run time.

Why Are Reactive Forms Confusing Developers?

Never repeat yourself..

Angular ControlContainer Class

A base class for directives that contain multiple registered instances of NgControl. Only used by the forms module.

ViewProviders Property of Angular Component Decorator

Defines the set of injectable objects that are visible to its view DOM children

Crete Child Components

Address Form Component
Employee Form Component

Employee Add Button and Value Renderer

Conclusion

Appendix:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store