-
Notifications
You must be signed in to change notification settings - Fork 3
Working with Forms
Lakshman.S edited this page Oct 4, 2020
·
1 revision
Hi Friends, This is Lakshman here.
As part of the Series "Angular Best Practices".
Today, We will go through Practices to follow for Working with Forms
In Every Angular Application, there will be at least Form to Fill by End User.
- There are many ways to implement Forms,
- Using Form Module.
- Using Reactive Module.
- Uses ngModel directive for Two-Way Binding.
- Required to Bind Model's Value into Object to Post for API.
- Need to Retrieve Data and Bind to Model's
- Uses formBuilder to generate Form in TS.
- Uses formControlName directive for Bind Model.
- Always Use Reactive Forms, if it has more than a field.
- Design Forms as same as Interface.
- Helps to set Validator initially while creating form via Form Group.
- Easy Validation Options.
You may also access to source code on GitHub by Click Here
On-road head, we will discuss a lot of things.
Looking forward to your comments and share your feedback.
Until that, I am Lakshman, Signing Off.