From ec811d9f9769d983b755a297147fbec57c2b279d Mon Sep 17 00:00:00 2001 From: Harshit Sachdev Date: Fri, 9 Jan 2026 16:28:19 +0530 Subject: [PATCH] Week 4 Day 5: Developed reactive forms using FormGroup and validators --- Week-4/Day-5/Reame.md | 32 ++++++++++++++++++++++++++ Week-4/Day-5/angular-reactive-forms.md | 31 +++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 Week-4/Day-5/Reame.md create mode 100644 Week-4/Day-5/angular-reactive-forms.md diff --git a/Week-4/Day-5/Reame.md b/Week-4/Day-5/Reame.md new file mode 100644 index 0000000..c4800ba --- /dev/null +++ b/Week-4/Day-5/Reame.md @@ -0,0 +1,32 @@ +# Week 4 – Day 5: Reactive Forms + +## Date +09 January 2026 + +## Objective +To understand and implement reactive forms in Angular for complex and scalable form handling. + +## Topics Covered +- Introduction to Reactive Forms +- FormGroup and FormControl +- Validators +- Reactive Form Submission +- Error Handling + +## Activities Performed +- Created reactive forms using TypeScript +- Applied built-in validators +- Implemented form submission logic +- Displayed validation errors dynamically +- Compared reactive forms with template-driven forms + +## Tools & Technologies Used +- Angular +- TypeScript +- ReactiveFormsModule + +## Learning Outcome +Developed a strong understanding of reactive forms and learned how to build scalable, controlled forms in Angular. + +## Status +Completed diff --git a/Week-4/Day-5/angular-reactive-forms.md b/Week-4/Day-5/angular-reactive-forms.md new file mode 100644 index 0000000..817ff86 --- /dev/null +++ b/Week-4/Day-5/angular-reactive-forms.md @@ -0,0 +1,31 @@ +## 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. \ No newline at end of file