How to automatically add an asterisk (*) for required fields in the reactive form using Angular
This article describes a method for automatically adding an asterisk (*)
to required fields in a reactive form using Angular.
It uses the built-in validators in Angular to determine if a field is required
and then uses a component to add the asterisk
to the label of the corresponding form field.
Create a custom select component with typeahead built on @angular/cdk in Angular
Native select element is used to create a drop-down list of options for users to choose from but does not support searching and typeahead.
Because of that, there are situations where developers are forced
to create their own select component.
See how you can implement custom select with searching with typehead.
How to correctly disable submit button in reactive forms in Angular
In this article, you can learn why you should always disable buttons with !form.valid.
How to get the max value from FormControl’s validator
Unfortunately `hasValidator` does not work well with validators created dynamically like `Validator.max` but there is a solution that allows getting information about max value anyway.
How to display max length based on FormControl’s validator
Unfortunately `hasValidator` does not work well with validators created dynamically
like `Validator.maxLength` but there is a solution
that allows getting information about maxLength value anyway.
How to check if a FormControl has a `min` validator
Unfortunately `hasValidator` does not work well with validators created
dynamically like `Validator.min` but there is a solution that allows getting information about min value anyway.