Reactive Forms
Reactive Forms as opposed to template forms.
If you want responsive validation as you fill in the form, Reactive forms are the way to go. Infact, template forms should only really be used for very simple forms with just text controls.
Features:
Built in validators
Custom validators
FormBuilder
Invalid Feedack
This is the text in red that appears under the controls if there are validation errors. This needs to be ngIf guarded manually as does the 'is-invalid' class which gives the control a red border The touched property on the control can be checked to stop the errors appearing before the user has started using the control.
Datepicker
To get a uniform experience across browsers, it best to use the ngx-bootstrap datepicker control.
Time Ago Pipe
pipe package to provide the time ago. This doesn't work for Angular 9, so currently can only be used with Angular 8.
There is an open issue and raised on stack overflow . used ngx-timeago instead.
If you want responsive validation as you fill in the form, Reactive forms are the way to go. Infact, template forms should only really be used for very simple forms with just text controls.
Features:
Built in validators
Custom validators
FormBuilder
Invalid Feedack
This is the text in red that appears under the controls if there are validation errors. This needs to be ngIf guarded manually as does the 'is-invalid' class which gives the control a red border The touched property on the control can be checked to stop the errors appearing before the user has started using the control.
Datepicker
To get a uniform experience across browsers, it best to use the ngx-bootstrap datepicker control.
Time Ago Pipe
pipe package to provide the time ago. This doesn't work for Angular 9, so currently can only be used with Angular 8.
There is an open issue and raised on stack overflow . used ngx-timeago instead.
Comments
Post a Comment