-
Book Overview & Buying
-
Table Of Contents
Angular for Enterprise Applications - Third Edition
By :
So far, we’ve learned about forms using standard form controls and input controls provided by Angular Material. However, it is possible for you to create custom user controls. If you implement the ControlValueAccessor interface, then your custom controls will play nicely with forms and the ControlValueAccessor interface’s validation engine.
We will be creating the custom rater control shown in the following screenshot and will place it as a control on the first step of ProfileComponent:

Figure 8.12: The lemon rater user control
User controls are inherently highly reusable, tightly coupled, and customized components to enable rich user interactions. Let’s implement one.
The Lemon Rater will dynamically highlight the number of lemons selected as the user interacts with the control in real time. As such, creating a high-quality custom control is an expensive endeavor...