Files
Harshit-Sachdev/Week-4/Day-5/angular-reactive-forms.md

31 lines
754 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## Angular Forms Reactive Forms
### What are Reactive Forms?
Reactive forms are:
- More scalable
- Fully controlled using TypeScript
- Suitable for complex forms
### Form Group & Form Control
this.form = new FormGroup({
name: new FormControl(''),
email: new FormControl('')
});
### Validators
Validators.required
Validators.email
### Advantages of Reactive Forms
- Better control
- Easier testing
- Dynamic form creation
### Practical Work Done
- Created reactive forms
- Applied validators
- Handled form submission
- Displayed error messages
### Final Learning Outcome
By the end of Week 4, I gained hands-on experience in Angular components, services, routing, and forms, which are essential for building real-world Angular applications.