In this lecture, we were going to start working with template driven forms.
The last section was dedicated to reactive forms.
Previously, we would define form groups and controls in the class file.
Not everything was inside the class file.
We didn't have to mess around with the template.
Reactive forms are mainly configured in the class.
We can bind our forms to a reactive form with a set of directives.
They're not our only option.
Angular has an alternative module for working with forms.
Things are different with template driven forms.
Template driven forms are configured directly in the template.
As we will soon find out, template driven forms can become bloated pretty fast.
Template forms have a lower learning curve.
They're much simpler to learn.
Angular a semi automates the process of registering groups and controls.
You may want to start using template forms if you're working with a simple form with fewer requirements.
While it's not impossible to create complex forms, you will have a harder time creating dynamic forms.
We are going to make our login form functional through angular template form system.
Of course, we don't have to use this system.
We can continue to use reactive forms.
However, for demonstration purposes, I want to show you how to write template forms.
If we want to use template forms, we need to register a module.
It's similar to enabling reactive forms in an angular project.
Open the user module file.
The logging component is declared under this module.
If we want to use template forms, we need to import the module into the user module.
The module we are going to import can be found under the Angular Forms package.
There is already an import statement for this package.
We will update this import statement to include the Forms module object.
Next, we will add the forms module to the imports option.
We've successfully enabled template forms, and our project Angular is going to expose a set of directives
for controlling forms in the template.
Let's explore these directives in the next lecture.
We are going to begin working on the login form.