BPB Online LLP
Mastering Angular Reactive Forms
Mastering Angular Reactive Forms
US$ 19.95
The publisher has enabled DRM protection, which means that you need to use the BookFusion iOS, Android or Web app to read this eBook. This eBook cannot be used outside of the BookFusion platform.
Description
Contents
Reviews

Building confidence to develop any complex forms using Angular.

Key Features
● Includes best practices from Angular Community along with Angular 12 Standards.
● Exciting examples and in-depth practical demonstration of Angular Reactive Forms.
● Equipped with graphical illustrations and visual explanations on working of Angular Reactive Forms.

Description
Mastering Angular Reactive Forms provides all the needed tools to develop an Angular application using Reactive Forms. You will gain knowledge that will help you develop any form, regardless of its size and complexity.
You will learn about the basic building blocks of Angular Reactive Forms, apply a binding in all HTML form elements using Form Control, Form Group, or Form Array, and apply simple or complex validators. Furthermore, you will learn how to interact with end user's form value changes, how to Unit Test, and how to expand your form by building re-usable form parts beyond basics. The book is based on patterns that are widely used by the community and many enterprise companies.

After reading this book, you will not just upgrade your knowledge, but you will be a strong Angular developer helping enterprises with solutions in using Angular Reactive Forms.

What you will learn
● Test some examples on how to bind with all the HTML elements.
● Build strong proficiency in how to write and use rich Angular custom and async validators.
● Create dynamic validators by observing the values of your Form.
● Maintain high-quality code by writing unit tests.

Who this book is for
This book is for Angular web developers who want to build a strong knowledge of Reactive Forms and boost their productivity. A basic understanding of Angular would be beneficial to speed up the learnings from this book.

Table of Contents
1. Getting started with Reactive Forms
2. HTML Form Binding
3. Built-in Validators
4. Custom Validators
5. Interact with Control's Value and Status
6. Unit testing
7. Split and Reuse a Form

About the Author
Fanis Prodromou is a senior software engineer with a passion for Front End development with Angular. He lives in Athens, Greece, and has worked in many big companies. During his 14 years of coding, he has developed vast experience in code quality, application architecture, and application performance.

Being aware of how rapidly computer science and the tech aspects evolve, he tries to stay up to date by attending conferences and meetups, by studying and trying new technologies. He loves to share his knowledge and help other developers.

‘Sharing is Caring’

He teaches Angular in enterprise companies via Code. Hub institute. He writes articles and creates YouTube videos.
He enjoys spending time with his two cats. He enjoys hiking and scuba diving in his free time.

LinkedIn Profile: https://www.linkedin.com/in/prodromouf/
Blogs: https://blog.profanis.me/

Language
English
ISBN
9789391030247
Cover Page
Title Page
Copyright Page
Dedication Page
About the Author
About the Reviewer
Acknowledgement
Preface
Errata
Table of Contents
1. Getting Started with Reactive Forms
Introduction
Structure
Objective
What are Reactive Forms?
Why use Reactive Forms?
Understanding the Building Blocks
Working with FormControl
The FormControl class
Working with FormGroup
The formControlName directive
Nested FormGroup
The formGroupName directive
Using FormArray in a FormGroup
Adding controls dynamically in FormArray
Removing controls dynamically from FormArray
FormGroup Actions
The Create page
The Update page
The Form Model
The Form Builder
FormGroup with FormControls
FormArray with FormControl
Conclusion
Key terms
Questions
2. HTML Form Binding
Introduction
Structure
Objective
What is an HTML binding?
Binding Using Vanilla JavaScript
Binding using Angular Semantics
Binding using Reactive Forms
Data bind radio buttons
With [formControl] directive
With [formControlName] directive
Set default values
Data bind Checkbox
With [formControl] directive
With formControlName directive
Set default values
Data bind select element
Use case with predefined options with values
Set default values
Use case with predefined options without values
Set default values
Use case with string array Options
Set default values
Use case with object array Options
Set default values
Conclusion
Key terms
Questions
3. Built-in Validators
Introduction
Structure
Objective
Why use validators?
The validity in the controls
The built-in validators
FormControl Validators
FormGroup Validators
Accessing a FormGroup's controls
FormArray validators
Accessing a FormArray's controls
Using the AbstractControl properties in controls
The updateOn option
The AbstractControl properties and the CSS
Conclusion
Key terms
Questions
4. Custom Validators
Introduction
Structure
Objective
The structure of custom validators
The ValidationErrors - key
The ValidationErrors - value
FormControl custom validators
Writing the FormControl validator
Using the FormControl validator
Informing the user of an invalid FormControl validator
FormGroup custom validators
Writing the FormGroup Validator
Using the FormGroup validator
Informing the user of an invalid FormGroup validator
FormArray custom validators
Writing the FormArray validator
Using the FormArray validator
Informing the user of an invalid FormArray Validator
The structure of custom async validators
FormControl custom async validators
Writing the async validator
Using the async validator
Informing the user of an invalid async validator
Conclusion
Key terms
Questions
5. Interact with Control's Value and Status
Structure
Objective
Understanding the Observer Pattern
Handling the input changes in real-time
Using valueChanges in FormControl
Using valueChanges in FormGroup
Using valueChanges in FormArray
Handling the input statuses in real-time
Using the statusChanges property
Adding/Removing validators dynamically
Conclusion
Key terms
Questions
6. Unit Testing
Introduction
Structure
Objective
Why unit testing
The toolset
Understanding the Jasmine framework
Understanding the Karma runner
How to conduct unit testing
Learning the AAA pattern
Unit Testing a FormGroup
Using Test Doubles
Conclusion
Key terms
Questions
7. Split and Reuse a Form
Introduction
Structure
Objective
The FormGroupDirective
Splitting the form using FormGroupDirective
Basic Info child component
Address child component
The ControlValueAccessor
Creating a custom control with ControlValueAccessor
Reusing Form Model with ControlValueAccessor
Basic Info child component
Conclusion
Key terms
Questions
Index
The book hasn't received reviews yet.