Forms Support
You can use the ColorPicker and the ColorPalette in template-driven or reactive forms.
Template-Driven Forms
The following example demonstrates how to use the components in template-driven forms by using the ngForm
directive.
Reactive Forms
The FormGroup
provides a way to render reactive forms. For more details, refer to the Angular Documentation.
The following example demonstrates how to use the components in a reactive form.
FormField Association
The following example demonstrates how to use the ColorPicker within a FormField component and provide hint and error messages.