For a custom Angular element that behaves like a plain text input, Angular’s default value accessor may be enough. For a control with its own value semantics, parsing, or composite interaction, implement ControlValueAccessor to connect it to Angular Forms. If the control must also appear as an Angular Material form field, that bridge is only part of the integration.
When should a custom control implement ControlValueAccessor?
Angular describes ControlValueAccessor as “an interface that acts as a bridge between the Angular forms API and a native element in the DOM.” It allows reactive and template-driven forms to exchange values with the control users interact with. Angular’s API documentation defines the contract.
As an Amazon Associate I earn from qualifying purchases.
Do not implement an accessor just because an element is custom. Angular’s DefaultValueAccessor is designed for text inputs and textareas; Angular also documents using ngDefaultControl on a custom element whose behavior is similar and needs no special processing. The DefaultValueAccessor API describes this option.
Recommended Free Tools
| Situation | Approach | Why |
|---|---|---|
| A custom element behaves like a standard text field and needs no special processing | Use ngDefaultControl |
Angular’s default accessor can handle text-like value behavior. |
| The control parses or transforms values, represents a non-text value, or combines multiple interactive parts | Implement ControlValueAccessor |
The component needs to define how form values map to its view and how user changes map back. |
| The control is intended to work inside an Angular Material form field | Implement the forms bridge and meet the Material control integration requirements | Value access alone does not provide the full Material form-field behavior. |
What does the ControlValueAccessor contract do?
The interface has three required methods and one optional method. Angular supplies values and status changes through the accessor; the accessor saves callbacks so it can report user-originated changes and touch events back to the forms API. The interface reference documents each method.
#1 Best Overall
- With broad game support, the Logitech Gamepad F310 works with old standbys to today's biggest titles, so it's easy to set up and use with your favorite games.
- Profiler software allows the gamepad to be programmed to perform keyboard and mouse commands for games without gamepad support.* * Requires software installation.
- A familiar control layout that doesn't require a learning curve to be able to use, with all the same buttons as on an Xbox 360.
- The unique floating D-pad rests on four switches-instead of a single pivot point-making it responsive to quick changes in direction.
- The six-foot cord lets you lean back and play a comfortable distance from your PC monitor.
writeValue(value)receives a programmatic value from the form and updates the component’s view or internal state.registerOnChange(fn)gives the component a callback to invoke when the user changes the control.registerOnTouched(fn)gives the component a callback to invoke when it reaches its meaningful touched or blur boundary.setDisabledState(isDisabled)is optional, but should be implemented when the component needs to reflect form disabled status in its interactive UI.
These are two-way flows with different origins: writeValue carries model-to-view updates; the callback saved from registerOnChange carries user edits back to the model. Do not invoke the change callback just because writeValue updated the view—doing so can make a programmatic model update look like a user edit.
How do you implement the value and touch flows?
A minimal component saves the callbacks, updates its view on writes, and calls the change callback from the user interaction handler. The following illustrates the contract; adapt the event and value types to the control. It assumes the template has an input whose value, disabled state, and blur event are bound to the corresponding component members.
Rank #2
- Wide Compatibility: VOYEE wired 360 controller compatible with Microsoft Xbox 360 & Slim/ PC (Windows 11/10/8.1/8/7). Just plug and play, not for FPS games
- Enhanced Game Controller: Upgraded PC 360 controller with new left and right trigger buttons and more sensitive joysticks and buttons - Respond quickly to player commands without delay
- Astonishing Gaming Experience: VOYEE wired pc controller provides rumble control and according to the game automatic vibration feedback to enhanced game experience and match your personal preference
- Ergonomic Design: Grips's contours have been designed to fit your hands more comfortably to hold for a long time and 7.2ft cord allows greater
- What You Get: VOYEE wired 360/PC Controller, 45 Days Money Back, 365 Days Guarantee Against quality defect and 24 Hours Friendly Customer Support
export class CustomInputComponent implements ControlValueAccessor {
value = '';
disabled = false;
private onChange: (value: string) => void = () => {};
private onTouched: () => void = () => {};
writeValue(value: string | null): void {
this.value = value ?? '';
}
registerOnChange(fn: (value: string) => void): void {
this.onChange = fn;
}
registerOnTouched(fn: () => void): void {
this.onTouched = fn;
}
setDisabledState(isDisabled: boolean): void {
this.disabled = isDisabled;
}
handleInput(value: string): void {
this.value = value;
this.onChange(value);
}
handleBlur(): void {
this.onTouched();
}
}
In this example, handleInput is for a user-originated event, while writeValue is for a value supplied by the form. Call the saved touched callback when the control should count as touched—Angular’s API example uses blur as that boundary. For a composite control, choose a meaningful boundary for the whole control rather than marking it touched on every internal focus change.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →How does Angular discover the accessor?
Provide the component as an NG_VALUE_ACCESSOR so Angular Forms can use it as the value accessor for the control. Angular defines NG_VALUE_ACCESSOR as the injection token used to provide a ControlValueAccessor. See the token API reference for its role. The provider declaration belongs in the component’s Angular metadata; use the provider pattern supported by the Angular version installed in the project.
Rank #3
- 【Supported Operating System】The Game Controller is specifically designed for playing classic old school retro snes games on computer or laptop. Compatible with Windows 98 / ME / Vista / 2000/2003 / XP / 7 / 8 / 8.1 / 10/11, Mac OS X/ OS X 10.0 and beyond, Raspberry Pi, Raspberry PI 2 model B,Model A, Raspberry Pi 1 Model B+, Raspberry Pi 2,Raspberry Pi OS, Raspberry Pi 3 Model B+, Raspberry Pi 3, Raspberry Pi Zero.
- 【Simple USB Plug and Play】If your program or application accepts USB controller input, this classic game controller do not need install drivers or patches. 1.5 meter external cable(approx. 5 ft. Long). Notice: Please download the game emulator first before start the games, and then you must manually set the buttons and directionals within the emulator you're using, and the controller not automatically assigns buttons/directional axes. If on the Steam platform, you need to first enable Steam's "Universal Controller Configuration Support" and then restart Steam. After entering the game, you also need to manually bind key positions in the game
- 【High Sensitivity without Delay】Super sensitive buttons for precision control: 6 fire buttons, a 'Start' button and a 'Select' button, motion control cross. Play your favorite old school games with classic retro feel. Fits perfectly in the hand and also perfect for two player action.Note: Not applicable to Switch/PS games. Not Compatible with TV/ TV Box, third Mini Games Box and Tesla Model 3
- 【Supported Game Emulators】The game controller works with most emulators. Download any emulator you wish to download and use from Google and do the same with ROMS. Notice:Third party controller, not original controller. But it works phenomenal with the Raspberry Pi game emulation and so on
- 【Product Service】If you have any problem during use, send message to us and we will help you to solve the problem soon
How should a custom control handle disabled state?
When the form control becomes disabled or enabled, reflect that change in the component’s interactive elements through setDisabledState. For a composite control, apply the state to every element users could operate, not just the outer component. Angular documents this method as the accessor hook for form disabled-state changes in the ControlValueAccessor API.
What extra work does Angular Material require?
ControlValueAccessor connects a control to Angular Forms; it does not by itself make a component a complete Angular Material form-field control. Material integration has additional requirements, including how the custom control connects with the associated NgControl and exposes hint and error descriptions. The Angular Components custom form-field control guide discusses those requirements and a possible cyclic dependency when using both an accessor provider and direct assignment.
Rank #4
- ✅【Compatibility】Compatible with Raspberry Pi, Windows PC, Linux ,Mac. Specifically designed for playing classic old school retro snes games on computer or laptop.This is the USB controller what has a USB plug for PC, NOT compatible for Original SNES super Nintendo console
- ✅ 【Ergonomic Design】Super precise cross key and function buttons,the cross direction key adopts frosted concave design,anti-sweat and anti-slip.The shape of the controller is designed to fit the contour of your hands,easy and comfortable to hold.
- ✅ 【Advanced Game Experience】PC running operating system:Windows 98/2000/ ME/XP/Vista/Win7/8/8.1/11 or later,or Mac running OS X 10.0/Mac OS X or above.It works with most of emulators you wish to download and use,such as VirtuaNES(PC),sens9x,Zsens,sensgt,Uosnesw,RetroArch,OpenEmu(MAC),NESEmu and Jnes etc.
- ✅ 【Wired USB Connection】Standard USB 2.0 port with a 1.5 meters (5ft) cable, don't need to install any drivers, you must manually set the buttons and directionals within the emulator you're using, and the controller not automatically assigns buttons/directional axes. Notice: please download the game emulator first before start the games, you can download the emulator “VirtuaNES” on PC and “OpenEmu”on MAC.
- ✅【Satisfaction】Third party controller(USB Version), not for original snes console and not support for switch. If there is an incompatibility on MAC or Raspberry Pi , please contact the seller for a support.
For accessibility, a custom Material form-field control should reflect the hint and error element IDs in aria-describedby so assistive technology can receive those descriptions. Check the guide that matches the project’s installed Angular Material version before adopting its integration code; its details can be version-sensitive.
What should you verify before relying on the control?
Test the behavior that follows from the accessor contract and the form API you use:
Best Value
- Wired Controller, USB cable: 1.8M.
- Compatible with Switch (version 3.0.0 or above), Windows, Raspberry Pi devices.
- Rumble vibration.
- Support turbo function.
- A form-provided value updates the component view without being reported as a user edit.
- A user edit reaches the form model.
- The control becomes touched at the intended blur or interaction boundary.
- Disabled status reaches every interactive part of the control.
- The control behaves as expected with the chosen reactive or template-driven forms setup.
- If it is a Material form-field control, its associated control state and hint/error descriptions work with the installed Material version.
Angular’s Forms overview explains the shared role of reactive and template-driven forms in tracking changes between user-facing inputs and component form data.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




