0 votes
in Angular by
What are the differences between reactive forms and template driven forms?

1 Answer

0 votes
by

Below are the main differences between reactive forms and template driven forms

FeatureReactiveTemplate-Driven
Form model setupCreated(FormControl instance) in component explicitlyCreated by directives
Data updatesSynchronousAsynchronous
Form custom validationDefined as FunctionsDefined as Directives
TestingNo interaction with change detection cycleNeed knowledge of the change detection process
MutabilityImmutable(by always returning new value for FormControl instance)Mutable(Property always modified to new value)
ScalabilityMore scalable using low-level APIsLess scalable using due to abstraction on APIs

Related questions

0 votes
asked Sep 29, 2023 in Angular by JackTerrance
0 votes
asked Dec 13, 2023 in Angular by DavidAnderson
...