Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What are the differences between reactive forms and template driven forms?
Home
Angular
What are the differences between reactive forms and template driven forms?
0
votes
asked
Sep 24, 2023
in
Angular
by
AdilsonLima
What are the differences between reactive forms and template driven forms?
angularjs-interview-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Sep 24, 2023
by
AdilsonLima
Below are the main differences between reactive forms and template driven forms
Feature
Reactive
Template-Driven
Form model setup
Created(FormControl instance) in component explicitly
Created by directives
Data updates
Synchronous
Asynchronous
Form custom validation
Defined as Functions
Defined as Directives
Testing
No interaction with change detection cycle
Need knowledge of the change detection process
Mutability
Immutable(by always returning new value for FormControl instance)
Mutable(Property always modified to new value)
Scalability
More scalable using low-level APIs
Less scalable using due to abstraction on APIs
...